1 /*
2 * $Id$
3 *
4 * Created on 26 Jan 2010 by Paul Harrison (paul.harrison@manchester.ac.uk)
5 *
6 * Adapted from official SOFA C implementation http://www.iausofa.org/
7 */
8
9 package org.jastronomy.jsofa;
10
11 import static java.lang.StrictMath.*;
12
13 /**
14 * Java implementation of Standards of Fundamental Astronomy. <a href="http://www.iausofa.org/">http://www.iausofa.org/</a>
15 *
16 * This code has been created by hand translating the official C version.
17 *
18 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 02 Apr 2014
19 * @version JSOFA Release 20180130
20 * @since 26 Jan 2010
21 */
22 public class JSOFA {
23 /** tracked IAU SOFA release {@value}. */
24 public final static String SOFA_RELEASE = "2018-01-30";
25
26 /** JSOFA release {@value}*/
27 public final static String JSOFA_RELEASE = "20180130";
28
29 /** tracked IAU SOFA revision {@value}. */
30 public final static String SOFA_REVISION = "14";
31
32
33
34 /** Seconds of time to radians {@value} */
35 public final static double DS2R = (7.272205216643039903848712e-5);
36
37 /** Pi {@value}*/
38 public final static double DPI = (3.141592653589793238462643);
39
40 /** 2Pi {@value}*/
41 public final static double D2PI = (6.283185307179586476925287);
42
43 /** Radians to degrees {@value} */
44 public final static double DR2D = (57.29577951308232087679815);
45
46 /** Degrees to radians {@value}*/
47 public final static double DD2R = (1.745329251994329576923691e-2);
48
49 /** Radians to arcseconds {@value}*/
50 public final static double DR2AS = (206264.8062470963551564734);
51
52 /** Arcseconds to radians {@value}*/
53 public final static double DAS2R = (4.848136811095359935899141e-6);
54
55 /** Arcseconds in a full circle {@value}*/
56 public final static double TURNAS = (1296000.0);
57
58 /** Milliarcseconds to radians {@value}*/
59 public final static double DMAS2R = (DAS2R / 1e3);
60
61 /** Length of tropical year B1900 (days) {@value}*/
62 public final static double DTY = (365.242198781);
63
64 /** Reference epoch (J2000.0), Julian Date {@value}*/
65 public final static double DJ00 = (2451545.0);
66
67 /** Julian Date of Modified Julian Date zero {@value}*/
68 public final static double DJM0 = (2400000.5);
69
70 /** Reference epoch (J2000.0), Modified Julian Date {@value} */
71 public final static double DJM00 = (51544.5);
72
73 /** Seconds per day. {@value}*/
74 public final static double DAYSEC = (86400.0);
75
76 /** Days per Julian year */
77 public final static double DJY = (365.25);
78
79 /** Days per Julian century {@value} */
80 public final static double DJC = (36525.0);
81
82 /** Days per Julian millennium {@value} */
83 public final static double DJM = (365250.0);
84
85 /** 1977 Jan 1.0 as MJD */
86 public final static double DJM77 = (43144.0);
87
88 /** TT minus TAI (s) */
89 public final static double TTMTAI = (32.184);
90
91
92 /** Astronomical unit (m) IAU 2012 {@value} */
93 public final static double DAU = (149597870.7e3);
94
95 /** Speed of light (m/s) {@value} */
96 public final static double CMPS = 299792458.0;
97
98 /** Light time for 1 au (s) {@value} */
99 public final static double AULT = (DAU/CMPS);
100
101
102 /** Speed of light (au per day) {@value} */
103 public final static double DC = (DAYSEC / AULT);
104
105 /** L_G = 1 - d(TT)/d(TCG) */
106 public final static double ELG = (6.969290134e-10);
107
108 /** L_B = 1 - d(TDB)/d(TCB) at TAI 1977/1/1.0 */
109 public final static double ELB = (1.550519768e-8);
110
111 /** Schwarzschild radius of the Sun (au) {@value}
112 = 2 * 1.32712440041e20 / (2.99792458e8)^2 / 1.49597870700e11 */
113 public final static double SRS = 1.97412574336e-8;
114
115
116 /** TDB (s) at TAI 1977/1/1.0 */
117 public final static double TDB0 = (-6.55e-5);
118
119 private final static double TANGENT_TINY = 1e-6;
120
121 /** dint(A) - truncate to nearest whole number towards zero (double) */
122 private static double dint(final double A){ return ((A)<0.0?ceil(A):floor(A));}
123
124 /** dnint(A) - round to nearest whole number (double) */
125 private static double dnint(final double A){return ((A)<0.0?ceil((A)-0.5):floor((A)+0.5));}
126
127 /** dsign(A,B) - magnitude of A with sign of B (double) */
128 private static double dsign(final double A, double B){return ((B)<0.0?-abs(A):abs(A));}
129
130
131
132 /**
133 * Julian Date representation. The actual date is djm0+djm1, apportioned in any
134 * convenient way between the two arguments. For example,
135 * JD(TT)=2450123.7 could be expressed in any of these ways,
136 * among others:
137 *<pre>
138 * djm0 djm1
139 *
140 * 2450123.7 0.0 (JD method)
141 * 2451545.0 -1421.3 (J2000 method)
142 * 2400000.5 50123.2 (MJD method)
143 * 2450123.5 0.2 (date &time method)
144 *</pre>
145 *
146 * The JD method is the most natural and convenient to use in
147 * cases where the loss of several decimal digits of resolution
148 * is acceptable. The J2000 method is best matched to the way
149 * the argument is handled internally and will deliver the
150 * optimum resolution. The MJD method and the date &time methods
151 * are both good compromises between resolution and convenience.
152 *
153 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 28 Jan 2010
154 *
155 *
156 */
157 public static class JulianDate {
158 /** MJD zero-point */
159 public double djm0;
160 /** MJD offset */
161 public double djm1;
162 public JulianDate(double d1, double d2) {
163 djm0 = d1;
164 djm1 = d2;
165 }
166 }
167
168 /**
169 * Decompose radians into degrees, arcminutes, arcseconds, fraction.
170 *
171 *
172 * <p>This function is derived from the International Astronomical Union's
173 * SOFA (Standards Of Fundamental Astronomy) software collection.
174 *
175 * <p>Status: vector/matrix support function.
176 *
177 *
178 *
179 *<p>Called:<ul>
180 * <li>{@link #jauD2tf} decompose days to hms
181 *</ul>
182 * <p>Notes:
183 *<ol>
184 * <li> The argument ndp is interpreted as follows:
185 *
186 * <pre>
187 * ndp resolution
188 * : ...0000 00 00
189 * -7 1000 00 00
190 * -6 100 00 00
191 * -5 10 00 00
192 * -4 1 00 00
193 * -3 0 10 00
194 * -2 0 01 00
195 * -1 0 00 10
196 * 0 0 00 01
197 * 1 0 00 00.1
198 * 2 0 00 00.01
199 * 3 0 00 00.001
200 * : 0 00 00.000...
201 *</pre>
202 * <li> The largest positive useful value for ndp is determined by the
203 * size of angle, the format of doubles on the target platform, and
204 * the risk of overflowing idmsf[3]. On a typical platform, for
205 * angle up to 2pi, the available floating-point precision might
206 * correspond to ndp=12. However, the practical limit is typically
207 * ndp=9, set by the capacity of a 32-bit int, or ndp=4 if int is
208 * only 16 bits.
209 *
210 * <li> The absolute value of angle may exceed 2pi. In cases where it
211 * does not, it is up to the caller to test for and handle the
212 * case where angle is very nearly 2pi and rounds up to 360 degrees,
213 * by testing for idmsf[0]=360 and setting idmsf[0-3] to zero.
214 *</ol>
215 *@version 2008 May 27
216 *
217 * @since Release 20101201
218 *
219 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
220 * <!-- Given: -->
221 * @param ndp int resolution (Note 1)
222 * @param angle double angle in radians
223 * @param idmsf int[4] <u>returned</u> degrees, arcminutes, arcseconds, fraction
224 * <!-- Returned: -->
225 * @return sign char '+' or '-'
226 */
227 public static char jauA2af(final int ndp, final double angle, int idmsf[] ){
228 /* Hours to degrees * radians to turns */
229 final double F = 15.0 / D2PI;
230
231
232 /* Scale then use days to h,m,s function. */
233 char retval = jauD2tf(ndp, angle*F, idmsf);
234
235 return retval;
236
237
238 }
239
240
241
242 /**
243 * Decompose radians into hours, minutes, seconds, fraction.
244 *
245 *<p>This function is derived from the International Astronomical Union's
246 * SOFA (Standards Of Fundamental Astronomy) software collection.
247 *
248 *<p>Status: vector/matrix support function.
249 *
250 *<!-- Given: -->
251 * @param ndp int resolution (Note 1)
252 * @param angle double angle in radians
253 *
254 *<!-- Returned: -->
255 * @param ihmsf int[4] <u>returned</u> hours, minutes, seconds, fraction
256 * @return sign char <u>returned</u> '+' or '-'
257 *
258 *<p>Called:<ul>
259 * <li>{@link #jauD2tf} decompose days to hms
260 * </ul>
261 * <p>Notes:
262 * <ol>
263 *
264 * <li> The argument ndp is interpreted as follows:
265 * <pre>
266 * ndp resolution
267 * : ...0000 00 00
268 * -7 1000 00 00
269 * -6 100 00 00
270 * -5 10 00 00
271 * -4 1 00 00
272 * -3 0 10 00
273 * -2 0 01 00
274 * -1 0 00 10
275 * 0 0 00 01
276 * 1 0 00 00.1
277 * 2 0 00 00.01
278 * 3 0 00 00.001
279 * : 0 00 00.000...
280 *</pre>
281 * <li> The largest positive useful value for ndp is determined by the
282 * size of angle, the format of doubles on the target platform, and
283 * the risk of overflowing ihmsf[3]. On a typical platform, for
284 * angle up to 2pi, the available floating-point precision might
285 * correspond to ndp=12. However, the practical limit is typically
286 * ndp=9, set by the capacity of a 32-bit int, or ndp=4 if int is
287 * only 16 bits.
288 *
289 * <li> The absolute value of angle may exceed 2pi. In cases where it
290 * does not, it is up to the caller to test for and handle the
291 * case where angle is very nearly 2pi and rounds up to 24 hours,
292 * by testing for ihmsf[0]=24 and setting ihmsf(0-3) to zero.
293 *</ol>
294 * @version 2008 May 11
295 *
296 * @since Release 20101201
297 *
298 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
299 */
300 public static char jauA2tf(final int ndp, final double angle, int ihmsf[])
301 {
302 /* Scale then use days to h,m,s function. */
303 return jauD2tf(ndp, angle/D2PI, ihmsf);
304
305 }
306
307
308 /**
309 * Normalize angle into the range {@code 0 <= a < 2pi}.
310 *
311 *<p>This function is derived from the International Astronomical Union's
312 * SOFA (Standards Of Fundamental Astronomy) software collection.
313 *
314 *<p>Status: vector/matrix support function.
315 *
316 *<!-- Given: -->
317 * @param a double angle (radians)
318 *
319 * <!-- Returned (function value): -->
320 * @return double angle in range 0-2pi
321 *
322 *@version 2008 May 16
323 *
324 * @since Release 20101201
325 *
326 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
327 */
328 public static double jauAnp(final double a)
329 {
330 double w;
331
332
333 w = fmod(a, D2PI);
334 if (w < 0) w += D2PI;
335
336 return w;
337
338 }
339
340
341 /**
342 * Normalize angle into the range {@code -pi <= a < +pi}.
343 *
344 *<p>This function is derived from the International Astronomical Union's
345 * SOFA (Standards Of Fundamental Astronomy) software collection.
346 *
347 *<p>Status: vector/matrix support function.
348 *
349 *<!-- Given: -->
350 * @param a double angle (radians)
351 *
352 * <!-- Returned (function value): -->
353 * @return double angle in range +/-pi
354 *
355 *@version 2008 May 16
356 *
357 * @since Release 20101201
358 *
359 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
360 */
361 public static double jauAnpm(final double a)
362 {
363 double w;
364
365
366 w = fmod(a, D2PI);
367 if (abs(w) >= DPI) w -= dsign(D2PI, a);
368
369 return w;
370
371 }
372 /**
373 * Frame bias components of IAU 2000 precession-nutation models.
374 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 2 Feb 2010
375 *
376 * @since AIDA Stage 1
377 */
378 public static class FrameBias {
379 /** longitude corrections */
380 public double dpsibi;
381 /**obliquity corrections */
382 public double depsbi;
383 /** the ICRS RA of the J2000.0 mean equinox */
384 public double dra;
385 };
386
387 /**
388 * Frame bias components of IAU 2000 precession-nutation models (part
389 * of MHB2000 with additions).
390 *
391 *<p>This function is derived from the International Astronomical Union's
392 * SOFA (Standards Of Fundamental Astronomy) software collection.
393 *
394 *<p>Status: canonical model.
395 *
396 *<!-- Returned: -->
397 * @return dpsibi,depsbi double <u>returned</u> longitude and obliquity corrections
398 * dra double <u>returned</u> the ICRS RA of the J2000.0 mean equinox
399 *
400 * <p>Notes:
401 * <ol>
402 *
403 * <li> The frame bias corrections in longitude and obliquity (radians)
404 * are required in order to correct for the offset between the GCRS
405 * pole and the mean J2000.0 pole. They define, with respect to the
406 * GCRS frame, a J2000.0 mean pole that is consistent with the rest
407 * of the IAU 2000A precession-nutation model.
408 *
409 * <li> In addition to the displacement of the pole, the complete
410 * description of the frame bias requires also an offset in right
411 * ascension. This is not part of the IAU 2000A model, and is from
412 * Chapront et al. (2002). It is returned in radians.
413 *
414 * <li> This is a supplemented implementation of one aspect of the IAU
415 * 2000A nutation model, formally adopted by the IAU General
416 * Assembly in 2000, namely MHB2000 (Mathews et al. 2002).
417 *</ol>
418 *<p>References:
419 *
420 * Chapront, J., Chapront-Touze, M. &Francou, G., Astron.
421 * Astrophys., 387, 700, 2002.
422 *
423 * <p>Mathews, P.M., Herring, T.A., Buffet, B.A., "Modeling of nutation
424 * and precession New nutation series for nonrigid Earth and
425 * insights into the Earth's interior", J.Geophys.Res., 107, B4,
426 * 2002. The MHB2000 code itself was obtained on 9th September 2002
427 * from ftp://maia.usno.navy.mil/conv2000/chapter5/IAU2000A.
428 *
429 *@version 2009 December 17
430 *
431 * @since Release 20101201
432 *
433 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
434 */
435 public static FrameBias jauBi00()
436 {
437 /* The frame bias corrections in longitude and obliquity */
438 final double DPBIAS = -0.041775 * DAS2R,
439 DEBIAS = -0.0068192 * DAS2R;
440
441 /* The ICRS RA of the J2000.0 equinox (Chapront et al., 2002) */
442 final double DRA0 = -0.0146 * DAS2R;
443
444
445 /* Return the results (which are fixed). */
446 FrameBias retval = new FrameBias();
447 retval.dpsibi = DPBIAS;
448 retval.depsbi = DEBIAS;
449 retval.dra = DRA0;
450
451 return retval;
452
453 }
454
455
456 /**
457 * Frame bias and precession, IAU 2000.
458 *
459 *<p>This function is derived from the International Astronomical Union's
460 * SOFA (Standards Of Fundamental Astronomy) software collection.
461 *
462 *<p>Status: canonical model.
463 *
464 *<!-- Given: -->
465 * @param date1 double TT as a 2-part Julian Date (Note 1)
466 * @param date2 double TT as a 2-part Julian Date (Note 1)
467 *
468 *<!-- Returned: -->
469 * @param rb double[3][3] <u>returned</u> frame bias matrix (Note 2)
470 * @param rp double[3][3] <u>returned</u> precession matrix (Note 3)
471 * @param rbp double[3][3] <u>returned</u> bias-precession matrix (Note 4)
472 *
473 * <p>Notes:
474 * <ol>
475 *
476 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
477 * convenient way between the two arguments. For example,
478 * JD(TT)=2450123.7 could be expressed in any of these ways,
479 * among others:
480 *<pre>
481 * date1 date2
482 *
483 * 2450123.7 0.0 (JD method)
484 * 2451545.0 -1421.3 (J2000 method)
485 * 2400000.5 50123.2 (MJD method)
486 * 2450123.5 0.2 (date &time method)
487 *</pre>
488 * The JD method is the most natural and convenient to use in
489 * cases where the loss of several decimal digits of resolution
490 * is acceptable. The J2000 method is best matched to the way
491 * the argument is handled internally and will deliver the
492 * optimum resolution. The MJD method and the date &time methods
493 * are both good compromises between resolution and convenience.
494 *
495 * <li> The matrix rb transforms vectors from GCRS to mean J2000.0 by
496 * applying frame bias.
497 *
498 * <li> The matrix rp transforms vectors from J2000.0 mean equator and
499 * equinox to mean equator and equinox of date by applying
500 * precession.
501 *
502 * <li> The matrix rbp transforms vectors from GCRS to mean equator and
503 * equinox of date by applying frame bias then precession. It is
504 * the product rp x rb.
505 *
506 * <li> It is permissible to re-use the same array in the returned
507 * arguments. The arrays are filled in the order given.
508 *</ol>
509 *<p>Called:<ul>
510 * <li>{@link #jauBi00} frame bias components, IAU 2000
511 * <li>{@link #jauPr00} IAU 2000 precession adjustments
512 * <li>{@link #jauIr} initialize r-matrix to identity
513 * <li>{@link #jauRx} rotate around X-axis
514 * <li>{@link #jauRy} rotate around Y-axis
515 * <li>{@link #jauRz} rotate around Z-axis
516 * <li>{@link #jauCr} copy r-matrix
517 * <li>{@link #jauRxr} product of two r-matrices
518 * </ul>
519 *<p>Reference:
520 * "Expressions for the Celestial Intermediate Pole and Celestial
521 * Ephemeris Origin consistent with the IAU 2000A precession-
522 * nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
523 *
524 * n.b. The celestial ephemeris origin (CEO) was renamed "celestial
525 * intermediate origin" (CIO) by IAU 2006 Resolution 2.
526 *
527 *@version 2010 January 18
528 *
529 * @since Release 20101201
530 *
531 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
532 */
533 public static void jauBp00(final double date1, final double date2,
534 double rb[][], double rp[][], double rbp[][])
535 {
536 /* J2000.0 obliquity (Lieske et al. 1977) */
537 final double EPS0 = 84381.448 * DAS2R;
538
539 double t, dpsibi, depsbi;
540 double dra0, psia77, oma77, chia, dpsipr, depspr, psia, oma,
541 rbw[][] = new double[3][3];
542
543
544 /* Interval between fundamental epoch J2000.0 and current date (JC). */
545 t = ((date1 - DJ00) + date2) / DJC;
546
547 /* Frame bias. */
548 FrameBias fb = jauBi00();
549 dpsibi = fb.dpsibi;
550 depsbi = fb.depsbi;
551 dra0 = fb.dra;
552 /* Precession angles (Lieske et al. 1977) */
553 psia77 = (5038.7784 + (-1.07259 + (-0.001147) * t) * t) * t * DAS2R;
554 oma77 = EPS0 + ((0.05127 + (-0.007726) * t) * t) * t * DAS2R;
555 chia = ( 10.5526 + (-2.38064 + (-0.001125) * t) * t) * t * DAS2R;
556
557 /* Apply IAU 2000 precession corrections. */
558 PrecessionDeltaTerms pc = jauPr00(date1, date2);
559 dpsipr = pc.dpsipr; depspr = pc.depspr;
560 psia = psia77 + dpsipr;
561 oma = oma77 + depspr;
562
563 /* Frame bias matrix: GCRS to J2000.0. */
564 jauIr(rbw);
565 jauRz(dra0, rbw);
566 jauRy(dpsibi * sin(EPS0), rbw);
567 jauRx(-depsbi, rbw);
568 jauCr(rbw, rb);
569
570 /* Precession matrix: J2000.0 to mean of date. */
571 jauIr(rp);
572 jauRx(EPS0, rp);
573 jauRz(-psia, rp);
574 jauRx(-oma, rp);
575 jauRz(chia, rp);
576
577 /* Bias-precession matrix: GCRS to mean of date. */
578 double[][] rt = jauRxr(rp, rbw );
579 jauCr(rt, rbp);
580 return;
581
582 }
583
584
585 /**
586 * Frame bias and precession, IAU 2006.
587 *
588 *<p>This function is derived from the International Astronomical Union's
589 * SOFA (Standards Of Fundamental Astronomy) software collection.
590 *
591 *<p>Status: support function.
592 *
593 *<!-- Given: -->
594 * @param date1 double TT as a 2-part Julian Date (Note 1)
595 * @param date2 double TT as a 2-part Julian Date (Note 1)
596 *
597 *<!-- Returned: -->
598 * @param rb double[3][3] <u>returned</u> frame bias matrix (Note 2)
599 * @param rp double[3][3] <u>returned</u> precession matrix (Note 3)
600 * @param rbp double[3][3] <u>returned</u> bias-precession matrix (Note 4)
601 *
602 * <p>Notes:
603 * <ol>
604 *
605 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
606 * convenient way between the two arguments. For example,
607 * JD(TT)=2450123.7 could be expressed in any of these ways,
608 * among others:
609 *<pre>
610 * date1 date2
611 *
612 * 2450123.7 0.0 (JD method)
613 * 2451545.0 -1421.3 (J2000 method)
614 * 2400000.5 50123.2 (MJD method)
615 * 2450123.5 0.2 (date &time method)
616 *</pre>
617 * The JD method is the most natural and convenient to use in
618 * cases where the loss of several decimal digits of resolution
619 * is acceptable. The J2000 method is best matched to the way
620 * the argument is handled internally and will deliver the
621 * optimum resolution. The MJD method and the date &time methods
622 * are both good compromises between resolution and convenience.
623 *
624 * <li> The matrix rb transforms vectors from GCRS to mean J2000.0 by
625 * applying frame bias.
626 *
627 * <li> The matrix rp transforms vectors from mean J2000.0 to mean of
628 * date by applying precession.
629 *
630 * <li> The matrix rbp transforms vectors from GCRS to mean of date by
631 * applying frame bias then precession. It is the product rp x rb.
632 *
633 * <li> It is permissible to re-use the same array in the returned
634 * arguments. The arrays are filled in the order given.
635 *</ol>
636 *<p>Called:<ul>
637 * <li>{@link #jauPfw06} bias-precession F-W angles, IAU 2006
638 * <li>{@link #jauFw2m} F-W angles to r-matrix
639 * <li>{@link #jauPmat06} PB matrix, IAU 2006
640 * <li>{@link #jauTr} transpose r-matrix
641 * <li>{@link #jauRxr} product of two r-matrices
642 * </ul>
643 *<p>References:
644 *
645 * <p>Capitaine, N. &Wallace, P.T., 2006, Astron.Astrophys. 450, 855
646 *
647 * <p>Wallace, P.T. &Capitaine, N., 2006, Astron.Astrophys. 459, 981
648 *
649 *@version 2009 December 17
650 *
651 * @since Release 20101201
652 *
653 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
654 */
655 public static void jauBp06(final double date1, final double date2,
656 double rb[][], double rp[][], double rbp[][])
657 {
658 double rbt[][];
659
660
661 /* B matrix. */
662 FWPrecessionAngles fw = jauPfw06(DJM0, DJM00);
663 double[][] rt = jauFw2m(fw.gamb, fw.phib, fw.psib, fw.epsa);
664 jauCr(rt, rb);
665
666 /* PxB matrix. */
667 rt = jauPmat06(date1, date2 );
668 jauCr(rt, rbp);
669
670 /* P matrix. */
671 rbt = jauTr(rb);
672 rt = jauRxr(rbp, rbt);
673 jauCr(rt, rp);
674
675 return;
676
677 }
678
679 /**
680 * The components x,y are components of the Celestial Intermediate
681 * Pole unit vector in the Geocentric Celestial Reference System.
682 *
683 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 29 Jan 2010
684 *
685 * @since AIDA Stage 1
686 */
687 public static class CelestialIntermediatePole {
688 public double x;
689 public double y;
690 public CelestialIntermediatePole(double x, double y) {
691 this.x = x;
692 this.y = y;
693 }
694 }
695 /**
696 * Extract from the bias-precession-nutation matrix the X,Y coordinates
697 * of the Celestial Intermediate Pole.
698 *
699 *<p>This function is derived from the International Astronomical Union's
700 * SOFA (Standards Of Fundamental Astronomy) software collection.
701 *
702 *<p>Status: support function.
703 *
704 *<!-- Given: -->
705 * @param rbpn double[3][3] celestial-to-true matrix (Note 1)
706 *
707 *<!-- Returned: -->
708 * @return <u>returned</u> Celestial Intermediate Pole (Note 2)
709 *
710 * <p>Notes:
711 * <ol>
712 *
713 * <li> The matrix rbpn transforms vectors from GCRS to true equator (and
714 * CIO or equinox) of date, and therefore the Celestial Intermediate
715 * Pole unit vector is the bottom row of the matrix.
716 *
717 * <li> The arguments x,y are components of the Celestial Intermediate
718 * Pole unit vector in the Geocentric Celestial Reference System.
719 *</ol>
720 *<p>Reference:
721 *
722 * "Expressions for the Celestial Intermediate Pole and Celestial
723 * Ephemeris Origin consistent with the IAU 2000A precession-
724 * nutation model", Astron.Astrophys. 400, 1145-1154
725 * (2003)
726 *
727 * n.b. The celestial ephemeris origin (CEO) was renamed "celestial
728 * intermediate origin" (CIO) by IAU 2006 Resolution 2.
729 *
730 *@version 2010 January 18
731 *
732 * @since Release 20101201
733 *
734 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
735 */
736 public static CelestialIntermediatePole jauBpn2xy(double rbpn[][])
737 {
738 /* Extract the X,Y coordinates. */
739
740 return new CelestialIntermediatePole(rbpn[2][0], rbpn[2][1]);
741
742 }
743
744
745 /**
746 * Form the celestial-to-intermediate matrix for a given date using the
747 * IAU 2000A precession-nutation model.
748 *
749 *<p>This function is derived from the International Astronomical Union's
750 * SOFA (Standards Of Fundamental Astronomy) software collection.
751 *
752 *<p>Status: support function.
753 *
754 *<!-- Given: -->
755 * @param date1 double TT as a 2-part Julian Date (Note 1)
756 * @param date2 double TT as a 2-part Julian Date (Note 1)
757 *
758 *<!-- Returned: -->
759 * @return rc2i double[3][3] <u>returned</u> celestial-to-intermediate matrix (Note 2)
760 *
761 * <p>Notes:
762 * <ol>
763 *
764 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
765 * convenient way between the two arguments. For example,
766 * JD(TT)=2450123.7 could be expressed in any of these ways,
767 * among others:
768 *<pre>
769 * date1 date2
770 *
771 * 2450123.7 0.0 (JD method)
772 * 2451545.0 -1421.3 (J2000 method)
773 * 2400000.5 50123.2 (MJD method)
774 * 2450123.5 0.2 (date &time method)
775 *</pre>
776 * The JD method is the most natural and convenient to use in
777 * cases where the loss of several decimal digits of resolution
778 * is acceptable. The J2000 method is best matched to the way
779 * the argument is handled internally and will deliver the
780 * optimum resolution. The MJD method and the date &time methods
781 * are both good compromises between resolution and convenience.
782 *
783 * <li> The matrix rc2i is the first stage in the transformation from
784 * celestial to terrestrial coordinates:
785 *
786 * [TRS] = RPOM * R_3(ERA) * rc2i * [CRS]
787 *
788 * = rc2t * [CRS]
789 *
790 * where [CRS] is a vector in the Geocentric Celestial Reference
791 * System and [TRS] is a vector in the International Terrestrial
792 * Reference System (see IERS Conventions 2003), ERA is the Earth
793 * Rotation Angle and RPOM is the polar motion matrix.
794 *
795 * <li> A faster, but slightly less accurate result (about 1 mas), can be
796 * obtained by using instead the jauC2i00b function.
797 *</ol>
798 *<p>Called:<ul>
799 * <li>{@link #jauPnm00a} classical NPB matrix, IAU 2000A
800 * <li>{@link #jauC2ibpn} celestial-to-intermediate matrix, given NPB matrix
801 * </ul>
802 *<p>References:
803 *<ul>
804 * <li>"Expressions for the Celestial Intermediate Pole and Celestial
805 * Ephemeris Origin consistent with the IAU 2000A precession-
806 * nutation model", Astron.Astrophys. 400, 1145-1154
807 * (2003)
808 *
809 * n.b. The celestial ephemeris origin (CEO) was renamed "celestial
810 * intermediate origin" (CIO) by IAU 2006 Resolution 2.
811 *
812 * <li>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
813 * IERS Technical Note No. 32, BKG (2004)
814 *</ul>
815 *@version 2010 January 18
816 *
817 * @since Release 20101201
818 *
819 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
820 */
821 public static double[][] jauC2i00a(double date1, double date2)
822 {
823
824
825 /* Obtain the celestial-to-true matrix (IAU 2000A). */
826 double rbpn[][] = jauPnm00a(date1, date2);
827
828 /* Form the celestial-to-intermediate matrix. */
829 double rc2i[][] =jauC2ibpn(date1, date2, rbpn);
830
831 return rc2i;
832
833 }
834
835
836 /**
837 * Form the celestial-to-intermediate matrix for a given date using the
838 * IAU 2000B precession-nutation model.
839 *
840 *<p>This function is derived from the International Astronomical Union's
841 * SOFA (Standards Of Fundamental Astronomy) software collection.
842 *
843 *<p>Status: support function.
844 *
845 *<!-- Given: -->
846 * @param date1 double TT as a 2-part Julian Date (Note 1)
847 * @param date2 double TT as a 2-part Julian Date (Note 1)
848 *
849 *<!-- Returned: -->
850 * @return rc2i double[3][3] <u>returned</u> celestial-to-intermediate matrix (Note 2)
851 *
852 * <p>Notes:
853 * <ol>
854 *
855 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
856 * convenient way between the two arguments. For example,
857 * JD(TT)=2450123.7 could be expressed in any of these ways,
858 * among others:
859 *<pre>
860 * date1 date2
861 *
862 * 2450123.7 0.0 (JD method)
863 * 2451545.0 -1421.3 (J2000 method)
864 * 2400000.5 50123.2 (MJD method)
865 * 2450123.5 0.2 (date &time method)
866 *</pre>
867 * The JD method is the most natural and convenient to use in
868 * cases where the loss of several decimal digits of resolution
869 * is acceptable. The J2000 method is best matched to the way
870 * the argument is handled internally and will deliver the
871 * optimum resolution. The MJD method and the date &time methods
872 * are both good compromises between resolution and convenience.
873 *
874 * <li> The matrix rc2i is the first stage in the transformation from
875 * celestial to terrestrial coordinates:
876 *
877 * [TRS] = RPOM * R_3(ERA) * rc2i * [CRS]
878 *
879 * = rc2t * [CRS]
880 *
881 * where [CRS] is a vector in the Geocentric Celestial Reference
882 * System and [TRS] is a vector in the International Terrestrial
883 * Reference System (see IERS Conventions 2003), ERA is the Earth
884 * Rotation Angle and RPOM is the polar motion matrix.
885 *
886 * <li> The present function is faster, but slightly less accurate (about
887 * 1 mas), than the jauC2i00a function.
888 *</ol>
889 *<p>Called:<ul>
890 * <li>{@link #jauPnm00b} classical NPB matrix, IAU 2000B
891 * <li>{@link #jauC2ibpn} celestial-to-intermediate matrix, given NPB matrix
892 * </ul>
893 *<p>References:
894 *
895 * <p> "Expressions for the Celestial Intermediate Pole and Celestial
896 * Ephemeris Origin consistent with the IAU 2000A precession-
897 * nutation model", Astron.Astrophys. 400, 1145-1154
898 * (2003)
899 *
900 * n.b. The celestial ephemeris origin (CEO) was renamed "celestial
901 * intermediate origin" (CIO) by IAU 2006 Resolution 2.
902 *
903 * <p> McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
904 * IERS Technical Note No. 32, BKG (2004)
905 *
906 *@version 2010 January 18
907 *
908 * @since Release 20101201
909 *
910 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
911 */
912 public static double[][] jauC2i00b(double date1, double date2)
913 {
914 double rbpn[][];
915 double rc2i[][];
916
917 /* Obtain the celestial-to-true matrix (IAU 2000B). */
918 rbpn = jauPnm00b(date1, date2 );
919
920 /* Form the celestial-to-intermediate matrix. */
921 rc2i = jauC2ibpn(date1, date2, rbpn);
922
923 return rc2i;
924
925 }
926
927
928 /**
929 * Form the celestial-to-intermediate matrix for a given date using the
930 * IAU 2006 precession and IAU 2000A nutation models.
931 *
932 *<p>This function is derived from the International Astronomical Union's
933 * SOFA (Standards Of Fundamental Astronomy) software collection.
934 *
935 *<p>Status: support function.
936 *
937 *<!-- Given: -->
938 * @param date1 double TT as a 2-part Julian Date (Note 1)
939 * @param date2 double TT as a 2-part Julian Date (Note 1)
940 *
941 *<!-- Returned: -->
942 * @return rc2i double[3][3] <u>returned</u> celestial-to-intermediate matrix (Note 2)
943 *
944 * <p>Notes:
945 * <ol>
946 *
947 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
948 * convenient way between the two arguments. For example,
949 * JD(TT)=2450123.7 could be expressed in any of these ways,
950 * among others:
951 *<pre>
952 * date1 date2
953 *
954 * 2450123.7 0.0 (JD method)
955 * 2451545.0 -1421.3 (J2000 method)
956 * 2400000.5 50123.2 (MJD method)
957 * 2450123.5 0.2 (date &time method)
958 *</pre>
959 * The JD method is the most natural and convenient to use in
960 * cases where the loss of several decimal digits of resolution
961 * is acceptable. The J2000 method is best matched to the way
962 * the argument is handled internally and will deliver the
963 * optimum resolution. The MJD method and the date &time methods
964 * are both good compromises between resolution and convenience.
965 *
966 * <li> The matrix rc2i is the first stage in the transformation from
967 * celestial to terrestrial coordinates:
968 *
969 * [TRS] = RPOM * R_3(ERA) * rc2i * [CRS]
970 *
971 * = RC2T * [CRS]
972 *
973 * where [CRS] is a vector in the Geocentric Celestial Reference
974 * System and [TRS] is a vector in the International Terrestrial
975 * Reference System (see IERS Conventions 2003), ERA is the Earth
976 * Rotation Angle and RPOM is the polar motion matrix.
977 *</ol>
978 *<p>Called:<ul>
979 * <li>{@link #jauPnm06a} classical NPB matrix, IAU 2006/2000A
980 * <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
981 * <li>{@link #jauS06} the CIO locator s, Given X,Y, IAU 2006
982 * <li>{@link #jauC2ixys} celestial-to-intermediate matrix, Given X,Y and s
983 * </ul>
984 *<p>References:
985 *
986 * <p>McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003),
987 * IERS Technical Note No. 32, BKG
988 *
989 *@version 2008 May 13
990 *
991 * @since Release 20101201
992 *
993 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
994 */
995 public static double[][] jauC2i06a(double date1, double date2)
996 {
997 double rbpn[][], s, rc2i[][];
998
999
1000 /* Obtain the celestial-to-true matrix (IAU 2006/2000A). */
1001 rbpn = jauPnm06a(date1, date2);
1002
1003 /* Extract the X,Y coordinates. */
1004 CelestialIntermediatePole cip = jauBpn2xy(rbpn);
1005
1006 /* Obtain the CIO locator. */
1007 s = jauS06(date1, date2, cip.x, cip.y);
1008
1009 /* Form the celestial-to-intermediate matrix. */
1010 rc2i = jauC2ixys(cip.x, cip.y, s);
1011
1012 return rc2i;
1013
1014 }
1015
1016
1017 /**
1018 * Form the celestial-to-intermediate matrix for a given date given
1019 * the bias-precession-nutation matrix. IAU 2000.
1020 *
1021 *<p>This function is derived from the International Astronomical Union's
1022 * SOFA (Standards Of Fundamental Astronomy) software collection.
1023 *
1024 *<p>Status: support function.
1025 *
1026 *<!-- Given: -->
1027 * @param date1 double TT as a 2-part Julian Date (Note 1)
1028 * @param date2 double TT as a 2-part Julian Date (Note 1)
1029 * @param rbpn double[3][3] celestial-to-true matrix (Note 2)
1030 *
1031 *<!-- Returned: -->
1032 * @return rc2i double[3][3] <u>returned</u> celestial-to-intermediate matrix (Note 3)
1033 *
1034 * <p>Notes:
1035 * <ol>
1036 *
1037 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
1038 * convenient way between the two arguments. For example,
1039 * JD(TT)=2450123.7 could be expressed in any of these ways,
1040 * among others:
1041 *<pre>
1042 * date1 date2
1043 *
1044 * 2450123.7 0.0 (JD method)
1045 * 2451545.0 -1421.3 (J2000 method)
1046 * 2400000.5 50123.2 (MJD method)
1047 * 2450123.5 0.2 (date &time method)
1048 *</pre>
1049 * The JD method is the most natural and convenient to use in
1050 * cases where the loss of several decimal digits of resolution
1051 * is acceptable. The J2000 method is best matched to the way
1052 * the argument is handled internally and will deliver the
1053 * optimum resolution. The MJD method and the date &time methods
1054 * are both good compromises between resolution and convenience.
1055 *
1056 * <li> The matrix rbpn transforms vectors from GCRS to true equator (and
1057 * CIO or equinox) of date. Only the CIP (bottom row) is used.
1058 *
1059 * <li> The matrix rc2i is the first stage in the transformation from
1060 * celestial to terrestrial coordinates:
1061 *
1062 * [TRS] = RPOM * R_3(ERA) * rc2i * [CRS]
1063 *
1064 * = RC2T * [CRS]
1065 *
1066 * where [CRS] is a vector in the Geocentric Celestial Reference
1067 * System and [TRS] is a vector in the International Terrestrial
1068 * Reference System (see IERS Conventions 2003), ERA is the Earth
1069 * Rotation Angle and RPOM is the polar motion matrix.
1070 *
1071 * <li> Although its name does not include "00", This function is in fact
1072 * specific to the IAU 2000 models.
1073 *</ol>
1074 *<p>Called:<ul>
1075 * <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
1076 * <li>{@link #jauC2ixy} celestial-to-intermediate matrix, given X,Y
1077 * </ul>
1078 *<p>References:
1079 * <p> "Expressions for the Celestial Intermediate Pole and Celestial
1080 * Ephemeris Origin consistent with the IAU 2000A precession-
1081 * nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
1082 *
1083 * <p>n.b. The celestial ephemeris origin (CEO) was renamed "celestial
1084 * intermediate origin" (CIO) by IAU 2006 Resolution 2.
1085 *
1086 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
1087 * IERS Technical Note No. 32, BKG (2004)
1088 *
1089 *@version 2010 January 18
1090 *
1091 * @since Release 20101201
1092 *
1093 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
1094 */
1095 public static double[][] jauC2ibpn(double date1, double date2, double rbpn[][])
1096 {
1097
1098 /* Extract the X,Y coordinates. */
1099 CelestialIntermediatePole cip = jauBpn2xy(rbpn);
1100
1101
1102 /* Form the celestial-to-intermediate matrix (n.b. IAU 2000 specific). */
1103 double rc2i[][] =jauC2ixy(date1, date2, cip.x, cip.y);
1104
1105 return rc2i;
1106
1107 }
1108
1109
1110 /**
1111 * Form the celestial to intermediate-frame-of-date matrix for a given
1112 * date when the CIP X,Y coordinates are known. IAU 2000.
1113 *
1114 *<p>This function is derived from the International Astronomical Union's
1115 * SOFA (Standards Of Fundamental Astronomy) software collection.
1116 *
1117 *<p>Status: support function.
1118 *
1119 *<!-- Given: -->
1120 * @param date1 double TT as a 2-part Julian Date (Note 1)
1121 * @param date2 double TT as a 2-part Julian Date (Note 1)
1122 * @param x double Celestial Intermediate Pole (Note 2)
1123 * @param y double Celestial Intermediate Pole (Note 2)
1124 *
1125 *<!-- Returned: -->
1126 * @return rc2i double[3][3] <u>returned</u> celestial-to-intermediate matrix (Note 3)
1127 *
1128 * <p>Notes:
1129 * <ol>
1130 *
1131 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
1132 * convenient way between the two arguments. For example,
1133 * JD(TT)=2450123.7 could be expressed in any of these ways,
1134 * among others:
1135 *<pre>
1136 * date1 date2
1137 *
1138 * 2450123.7 0.0 (JD method)
1139 * 2451545.0 -1421.3 (J2000 method)
1140 * 2400000.5 50123.2 (MJD method)
1141 * 2450123.5 0.2 (date &time method)
1142 *</pre>
1143 * The JD method is the most natural and convenient to use in
1144 * cases where the loss of several decimal digits of resolution
1145 * is acceptable. The J2000 method is best matched to the way
1146 * the argument is handled internally and will deliver the
1147 * optimum resolution. The MJD method and the date &time methods
1148 * are both good compromises between resolution and convenience.
1149 *
1150 * <li> The Celestial Intermediate Pole coordinates are the x,y components
1151 * of the unit vector in the Geocentric Celestial Reference System.
1152 *
1153 * <li> The matrix rc2i is the first stage in the transformation from
1154 * celestial to terrestrial coordinates:
1155 *
1156 * [TRS] = RPOM * R_3(ERA) * rc2i * [CRS]
1157 *
1158 * = RC2T * [CRS]
1159 *
1160 * where [CRS] is a vector in the Geocentric Celestial Reference
1161 * System and [TRS] is a vector in the International Terrestrial
1162 * Reference System (see IERS Conventions 2003), ERA is the Earth
1163 * Rotation Angle and RPOM is the polar motion matrix.
1164 *
1165 * <li> Although its name does not include "00", This function is in fact
1166 * specific to the IAU 2000 models.
1167 *</ol>
1168 *<p>Called:<ul>
1169 * <li>{@link #jauC2ixys} celestial-to-intermediate matrix, given X,Y and s
1170 * <li>{@link #jauS00} the CIO locator s, given X,Y, IAU 2000A
1171 * </ul>
1172 *<p>Reference:
1173 *
1174 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
1175 * IERS Technical Note No. 32, BKG (2004)
1176 *
1177 *@version 2008 May 11
1178 *
1179 * @since Release 20101201
1180 *
1181 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
1182 */
1183
1184 public static double[][] jauC2ixy(double date1, double date2, double x, double y)
1185 {
1186 /* Compute s and then the matrix. */
1187 double rc2i[][] = jauC2ixys(x, y, jauS00(date1, date2, x, y));
1188
1189 return rc2i;
1190
1191 }
1192
1193
1194 /**
1195 * Form the celestial to intermediate-frame-of-date matrix given the CIP
1196 * X,Y and the CIO locator s.
1197 *
1198 *<p>This function is derived from the International Astronomical Union's
1199 * SOFA (Standards Of Fundamental Astronomy) software collection.
1200 *
1201 *<p>Status: support function.
1202 *
1203 *<!-- Given: -->
1204 * @param x double Celestial Intermediate Pole (Note 1)
1205 * @param y double Celestial Intermediate Pole (Note 1)
1206 * @param s double the CIO locator s (Note 2)
1207 *
1208 *<!-- Returned: -->
1209 * @return rc2i double[3][3] <u>returned</u> celestial-to-intermediate matrix (Note 3)
1210 *
1211 * <p>Notes:
1212 * <ol>
1213 *
1214 * <li> The Celestial Intermediate Pole coordinates are the x,y
1215 * components of the unit vector in the Geocentric Celestial
1216 * Reference System.
1217 *
1218 * <li> The CIO locator s (in radians) positions the Celestial
1219 * Intermediate Origin on the equator of the CIP.
1220 *
1221 * <li> The matrix rc2i is the first stage in the transformation from
1222 * celestial to terrestrial coordinates:
1223 *
1224 * [TRS] = RPOM * R_3(ERA) * rc2i * [CRS]
1225 *
1226 * = RC2T * [CRS]
1227 *
1228 * where [CRS] is a vector in the Geocentric Celestial Reference
1229 * System and [TRS] is a vector in the International Terrestrial
1230 * Reference System (see IERS Conventions 2003), ERA is the Earth
1231 * Rotation Angle and RPOM is the polar motion matrix.
1232 *</ol>
1233 *<p>Called:<ul>
1234 * <li>{@link #jauIr} initialize r-matrix to identity
1235 * <li>{@link #jauRz} rotate around Z-axis
1236 * <li>{@link #jauRy} rotate around Y-axis
1237 * </ul>
1238 *<p>Reference:
1239 *
1240 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
1241 * IERS Technical Note No. 32, BKG (2004)
1242 *
1243 *@version 2008 May 11
1244 *
1245 * @since Release 20101201
1246 *
1247 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
1248 */
1249 public static double[][] jauC2ixys(double x, double y, double s)
1250 {
1251 double r2, e, d;
1252 double rc2i[][] = new double[3][3];
1253
1254 /* Obtain the spherical angles E and d. */
1255 r2 = x*x + y*y;
1256 e = (r2 > 0.0) ? atan2(y, x) : 0.0;
1257 d = atan(sqrt(r2 / (1.0 - r2)));
1258
1259 /* Form the matrix. */
1260 jauIr(rc2i);
1261 jauRz(e, rc2i);
1262 jauRy(d, rc2i);
1263 jauRz(-(e+s), rc2i);
1264
1265 return rc2i;
1266
1267 }
1268
1269 /**
1270 * P-vector to spherical coordinates.
1271 *
1272 *<p>This function is derived from the International Astronomical Union's
1273 * SOFA (Standards Of Fundamental Astronomy) software collection.
1274 *
1275 *<p>Status: vector/matrix support function.
1276 *
1277 *<!-- Given: -->
1278 * @param p double[3] p-vector
1279 *
1280 *<!-- Returned: -->
1281 * @return theta double <u>returned</u> longitude angle (radians)
1282 * phi double <u>returned</u> latitude angle (radians)
1283 *
1284 * <p>Notes:
1285 * <ol>
1286 *
1287 * <li> The vector p can have any magnitude; only its direction is used.
1288 *
1289 * <li> If p is null, zero theta and phi are returned.
1290 *
1291 * <li> At either pole, zero theta is returned.
1292 *</ol>
1293 *@version 2008 May 11
1294 *
1295 * @since Release 20101201
1296 *
1297 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
1298 */
1299 public static SphericalCoordinate jauC2s(double p[])
1300 {
1301 double x, y, z, d2;
1302
1303
1304 x = p[0];
1305 y = p[1];
1306 z = p[2];
1307 d2 = x*x + y*y;
1308
1309 double theta = (d2 == 0.0) ? 0.0 : atan2(y, x);
1310 double phi = (z == 0.0) ? 0.0 : atan2(z, sqrt(d2));
1311
1312 return new SphericalCoordinate(theta, phi);
1313
1314 }
1315
1316
1317 /**
1318 * Form the celestial to terrestrial matrix given the date, the UT1 and
1319 * the polar motion, using the IAU 2000A nutation model.
1320 *
1321 *<p>This function is derived from the International Astronomical Union's
1322 * SOFA (Standards Of Fundamental Astronomy) software collection.
1323 *
1324 *<p>Status: support function.
1325 *
1326 *<!-- Given: -->
1327 * @param tta double TT as a 2-part Julian Date (Note 1)
1328 * @param ttb double TT as a 2-part Julian Date (Note 1)
1329 * @param uta double UT1 as a 2-part Julian Date (Note 1)
1330 * @param utb double UT1 as a 2-part Julian Date (Note 1)
1331 * @param xp double coordinates of the pole (radians, Note 2)
1332 * @param yp double coordinates of the pole (radians, Note 2)
1333 *
1334 *<!-- Returned: -->
1335 * @return rc2t double[3][3] <u>returned</u> celestial-to-terrestrial matrix (Note 3)
1336 *
1337 * <p>Notes:
1338 * <ol>
1339 *
1340 * <li> The TT and UT1 dates tta+ttb and uta+utb are Julian Dates,
1341 * apportioned in any convenient way between the arguments uta and
1342 * utb. For example, JD(UT1)=2450123.7 could be expressed in any of
1343 * these ways, among others:
1344 *<pre>
1345 * uta utb
1346 *
1347 * 2450123.7 0.0 (JD method)
1348 * 2451545.0 -1421.3 (J2000 method)
1349 * 2400000.5 50123.2 (MJD method)
1350 * 2450123.5 0.2 (date &time method)
1351 *</pre>
1352 * The JD method is the most natural and convenient to use in
1353 * cases where the loss of several decimal digits of resolution is
1354 * acceptable. The J2000 and MJD methods are good compromises
1355 * between resolution and convenience. In the case of uta,utb, the
1356 * date &time method is best matched to the Earth rotation angle
1357 * algorithm used: maximum precision is delivered when the uta
1358 * argument is for 0hrs UT1 on the day in question and the utb
1359 * argument lies in the range 0 to 1, or vice versa.
1360 *
1361 * <li> The arguments xp and yp are the coordinates (in radians) of the
1362 * Celestial Intermediate Pole with respect to the International
1363 * Terrestrial Reference System (see IERS Conventions 2003),
1364 * measured along the meridians to 0 and 90 deg west respectively.
1365 *
1366 * <li> The matrix rc2t transforms from celestial to terrestrial
1367 * coordinates:
1368 *
1369 * [TRS] = RPOM * R_3(ERA) * RC2I * [CRS]
1370 *
1371 * = rc2t * [CRS]
1372 *
1373 * where [CRS] is a vector in the Geocentric Celestial Reference
1374 * System and [TRS] is a vector in the International Terrestrial
1375 * Reference System (see IERS Conventions 2003), RC2I is the
1376 * celestial-to-intermediate matrix, ERA is the Earth rotation
1377 * angle and RPOM is the polar motion matrix.
1378 *
1379 * <li> A faster, but slightly less accurate result (about 1 mas), can
1380 * be obtained by using instead the jauC2t00b function.
1381 *</ol>
1382 *<p>Called:<ul>
1383 * <li>{@link #jauC2i00a} celestial-to-intermediate matrix, IAU 2000A
1384 * <li>{@link #jauEra00} Earth rotation angle, IAU 2000
1385 * <li>{@link #jauSp00} the TIO locator s', IERS 2000
1386 * <li>{@link #jauPom00} polar motion matrix
1387 * <li>{@link #jauC2tcio} form CIO-based celestial-to-terrestrial matrix
1388 * </ul>
1389 *<p>Reference:
1390 *
1391 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
1392 * IERS Technical Note No. 32, BKG (2004)
1393 *
1394 *@version 2009 April 1
1395 *
1396 * @since Release 20101201
1397 *
1398 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
1399 */
1400 public static double[][] jauC2t00a(final double tta, final double ttb, final double uta, final double utb,
1401 final double xp, final double yp)
1402 {
1403 double rc2i[][]= new double[3][3], era, sp, rpom[][];
1404
1405
1406 /* Form the celestial-to-intermediate matrix for this TT (IAU 2000A). */
1407 rc2i = jauC2i00a(tta, ttb);
1408
1409 /* Predict the Earth rotation angle for this UT1. */
1410 era = jauEra00(uta, utb);
1411
1412 /* Estimate s'. */
1413 sp = jauSp00(tta, ttb);
1414
1415 /* Form the polar motion matrix. */
1416 rpom = jauPom00(xp, yp, sp );
1417
1418 /* Combine to form the celestial-to-terrestrial matrix. */
1419 double[][] rc2t = jauC2tcio(rc2i, era, rpom );
1420
1421 return rc2t;
1422
1423 }
1424
1425
1426 /**
1427 * Form the celestial to terrestrial matrix given the date, the UT1 and
1428 * the polar motion, using the IAU 2000B nutation model.
1429 *
1430 *<p>This function is derived from the International Astronomical Union's
1431 * SOFA (Standards Of Fundamental Astronomy) software collection.
1432 *
1433 *<p>Status: support function.
1434 *
1435 *<!-- Given: -->
1436 * @param tta double TT as a 2-part Julian Date (Note 1)
1437 * @param ttb double TT as a 2-part Julian Date (Note 1)
1438 * @param uta double UT1 as a 2-part Julian Date (Note 1)
1439 * @param utb double UT1 as a 2-part Julian Date (Note 1)
1440 * @param xp double coordinates of the pole (radians, Note 2)
1441 * @param yp double coordinates of the pole (radians, Note 2)
1442 *
1443 *<!-- Returned: -->
1444 * @return rc2t double[3][3] <u>returned</u> celestial-to-terrestrial matrix (Note 3)
1445 *
1446 * <p>Notes:
1447 * <ol>
1448 *
1449 * <li> The TT and UT1 dates tta+ttb and uta+utb are Julian Dates,
1450 * apportioned in any convenient way between the arguments uta and
1451 * utb. For example, JD(UT1)=2450123.7 could be expressed in any of
1452 * these ways, among others:
1453 *<pre>
1454 * uta utb
1455 *
1456 * 2450123.7 0.0 (JD method)
1457 * 2451545.0 -1421.3 (J2000 method)
1458 * 2400000.5 50123.2 (MJD method)
1459 * 2450123.5 0.2 (date &time method)
1460 *</pre>
1461 * The JD method is the most natural and convenient to use in
1462 * cases where the loss of several decimal digits of resolution is
1463 * acceptable. The J2000 and MJD methods are good compromises
1464 * between resolution and convenience. In the case of uta,utb, the
1465 * date &time method is best matched to the Earth rotation angle
1466 * algorithm used: maximum precision is delivered when the uta
1467 * argument is for 0hrs UT1 on the day in question and the utb
1468 * argument lies in the range 0 to 1, or vice versa.
1469 *
1470 * <li> The arguments xp and yp are the coordinates (in radians) of the
1471 * Celestial Intermediate Pole with respect to the International
1472 * Terrestrial Reference System (see IERS Conventions 2003),
1473 * measured along the meridians to 0 and 90 deg west respectively.
1474 *
1475 * <li> The matrix rc2t transforms from celestial to terrestrial
1476 * coordinates:
1477 *
1478 * [TRS] = RPOM * R_3(ERA) * RC2I * [CRS]
1479 *
1480 * = rc2t * [CRS]
1481 *
1482 * where [CRS] is a vector in the Geocentric Celestial Reference
1483 * System and [TRS] is a vector in the International Terrestrial
1484 * Reference System (see IERS Conventions 2003), RC2I is the
1485 * celestial-to-intermediate matrix, ERA is the Earth rotation
1486 * angle and RPOM is the polar motion matrix.
1487 *
1488 * <li> The present function is faster, but slightly less accurate (about
1489 * 1 mas), than the jauC2t00a function.
1490 *</ol>
1491 *<p>Called:<ul>
1492 * <li>{@link #jauC2i00b} celestial-to-intermediate matrix, IAU 2000B
1493 * <li>{@link #jauEra00} Earth rotation angle, IAU 2000
1494 * <li>{@link #jauPom00} polar motion matrix
1495 * <li>{@link #jauC2tcio} form CIO-based celestial-to-terrestrial matrix
1496 * </ul>
1497 *<p>Reference:
1498 *
1499 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
1500 * IERS Technical Note No. 32, BKG (2004)
1501 *
1502 *@version 2009 April 1
1503 *
1504 * @since Release 20101201
1505 *
1506 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
1507 */
1508 public static double[][] jauC2t00b(final double tta, final double ttb, final double uta, final double utb,
1509 final double xp, final double yp )
1510 {
1511 double rc2i[][], era, rpom[][];
1512 double rc2t[][];
1513
1514 /* Form the celestial-to-intermediate matrix for this TT (IAU 2000B). */
1515 rc2i =jauC2i00b(tta, ttb);
1516
1517 /* Predict the Earth rotation angle for this UT1. */
1518 era = jauEra00(uta, utb);
1519
1520 /* Form the polar motion matrix (neglecting s'). */
1521 rpom = jauPom00(xp, yp, 0.0 );
1522
1523 /* Combine to form the celestial-to-terrestrial matrix. */
1524 rc2t = jauC2tcio(rc2i, era, rpom );
1525
1526 return rc2t;
1527
1528 }
1529
1530
1531 /**
1532 * Form the celestial to terrestrial matrix given the date, the UT1 and
1533 * the polar motion, using the IAU 2006 precession and IAU 2000A
1534 * nutation models.
1535 *
1536 *<p>This function is derived from the International Astronomical Union's
1537 * SOFA (Standards Of Fundamental Astronomy) software collection.
1538 *
1539 *<p>Status: support function.
1540 *
1541 *<!-- Given: -->
1542 * @param tta double TT as a 2-part Julian Date (Note 1)
1543 * @param ttb double TT as a 2-part Julian Date (Note 1)
1544 * @param uta double UT1 as a 2-part Julian Date (Note 1)
1545 * @param utb double UT1 as a 2-part Julian Date (Note 1)
1546 * @param xp double coordinates of the pole (radians, Note 2)
1547 * @param yp double coordinates of the pole (radians, Note 2)
1548 *
1549 *<!-- Returned: -->
1550 * @return rc2t double[3][3] <u>returned</u> celestial-to-terrestrial matrix (Note 3)
1551 *
1552 * <p>Notes:
1553 * <ol>
1554 *
1555 * <li> The TT and UT1 dates tta+ttb and uta+utb are Julian Dates,
1556 * apportioned in any convenient way between the arguments uta and
1557 * utb. For example, JD(UT1)=2450123.7 could be expressed in any of
1558 * these ways, among others:
1559 *<pre>
1560 * uta utb
1561 *
1562 * 2450123.7 0.0 (JD method)
1563 * 2451545.0 -1421.3 (J2000 method)
1564 * 2400000.5 50123.2 (MJD method)
1565 * 2450123.5 0.2 (date &time method)
1566 *</pre>
1567 * The JD method is the most natural and convenient to use in
1568 * cases where the loss of several decimal digits of resolution is
1569 * acceptable. The J2000 and MJD methods are good compromises
1570 * between resolution and convenience. In the case of uta,utb, the
1571 * date &time method is best matched to the Earth rotation angle
1572 * algorithm used: maximum precision is delivered when the uta
1573 * argument is for 0hrs UT1 on the day in question and the utb
1574 * argument lies in the range 0 to 1, or vice versa.
1575 *
1576 * <li> The arguments xp and yp are the coordinates (in radians) of the
1577 * Celestial Intermediate Pole with respect to the International
1578 * Terrestrial Reference System (see IERS Conventions 2003),
1579 * measured along the meridians to 0 and 90 deg west respectively.
1580 *
1581 * <li> The matrix rc2t transforms from celestial to terrestrial
1582 * coordinates:
1583 *
1584 * [TRS] = RPOM * R_3(ERA) * RC2I * [CRS]
1585 *
1586 * = rc2t * [CRS]
1587 *
1588 * where [CRS] is a vector in the Geocentric Celestial Reference
1589 * System and [TRS] is a vector in the International Terrestrial
1590 * Reference System (see IERS Conventions 2003), RC2I is the
1591 * celestial-to-intermediate matrix, ERA is the Earth rotation
1592 * angle and RPOM is the polar motion matrix.
1593 *</ol>
1594 *<p>Called:<ul>
1595 * <li>{@link #jauC2i06a} celestial-to-intermediate matrix, IAU 2006/2000A
1596 * <li>{@link #jauEra00} Earth rotation angle, IAU 2000
1597 * <li>{@link #jauSp00} the TIO locator s', IERS 2000
1598 * <li>{@link #jauPom00} polar motion matrix
1599 * <li>{@link #jauC2tcio} form CIO-based celestial-to-terrestrial matrix
1600 * </ul>
1601 *<p>Reference:
1602 *
1603 * <p>McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003),
1604 * IERS Technical Note No. 32, BKG
1605 *
1606 *@version 2009 April 1
1607 *
1608 * @since Release 20101201
1609 *
1610 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
1611 */
1612 public static double[][] jauC2t06a(final double tta, final double ttb, final double uta, final double utb,
1613 final double xp, final double yp)
1614 {
1615 double rc2i[][], era, sp, rpom[][], rc2t[][];
1616
1617
1618 /* Form the celestial-to-intermediate matrix for this TT. */
1619 rc2i = jauC2i06a(tta, ttb);
1620
1621 /* Predict the Earth rotation angle for this UT1. */
1622 era = jauEra00(uta, utb);
1623
1624 /* Estimate s'. */
1625 sp = jauSp00(tta, ttb);
1626
1627 /* Form the polar motion matrix. */
1628 rpom = jauPom00(xp, yp, sp );
1629
1630 /* Combine to form the celestial-to-terrestrial matrix. */
1631 rc2t = jauC2tcio(rc2i, era, rpom );
1632
1633 return rc2t;
1634
1635 }
1636
1637
1638 /**
1639 * Assemble the celestial to terrestrial matrix from CIO-based
1640 * components (the celestial-to-intermediate matrix, the Earth Rotation
1641 * Angle and the polar motion matrix).
1642 *
1643 *<p>This function is derived from the International Astronomical Union's
1644 * SOFA (Standards Of Fundamental Astronomy) software collection.
1645 *
1646 *<p>Status: support function.
1647 *
1648 *<!-- Given: -->
1649 * @param rc2i double[3][3] celestial-to-intermediate matrix
1650 * @param era double Earth rotation angle (radians)
1651 * @param rpom double[3][3] polar-motion matrix
1652 *
1653 *<!-- Returned: -->
1654 * @return rc2t double[3][3] <u>returned</u> celestial-to-terrestrial matrix
1655 *
1656 * <p>Notes:
1657 * <ol>
1658 *
1659 * <li> This function constructs the rotation matrix that transforms
1660 * vectors in the celestial system into vectors in the terrestrial
1661 * system. It does so starting from precomputed components, namely
1662 * the matrix which rotates from celestial coordinates to the
1663 * intermediate frame, the Earth rotation angle and the polar motion
1664 * matrix. One use of the present function is when generating a
1665 * series of celestial-to-terrestrial matrices where only the Earth
1666 * Rotation Angle changes, avoiding the considerable overhead of
1667 * recomputing the precession-nutation more often than necessary to
1668 * achieve given accuracy objectives.
1669 *
1670 * <li> The relationship between the arguments is as follows:
1671 *
1672 * [TRS] = RPOM * R_3(ERA) * rc2i * [CRS]
1673 *
1674 * = rc2t * [CRS]
1675 *
1676 * where [CRS] is a vector in the Geocentric Celestial Reference
1677 * System and [TRS] is a vector in the International Terrestrial
1678 * Reference System (see IERS Conventions 2003).
1679 *</ol>
1680 *<p>Called:<ul>
1681 * <li>{@link #jauCr} copy r-matrix
1682 * <li>{@link #jauRz} rotate around Z-axis
1683 * <li>{@link #jauRxr} product of two r-matrices
1684 * </ul>
1685 *<p>Reference:
1686 *
1687 * <p>McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003),
1688 * IERS Technical Note No. 32, BKG
1689 *
1690 *@version 2008 May 11
1691 *
1692 * @since Release 20101201
1693 *
1694 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
1695 */
1696 public static double[][] jauC2tcio(final double rc2i[][], final double era, final double rpom[][])
1697 {
1698 double r[][] = new double[3][3];
1699
1700
1701 /* Construct the matrix. */
1702 jauCr(rc2i, r);
1703 jauRz(era, r);
1704 double[][] rc2t = jauRxr(rpom, r);
1705
1706 return rc2t;
1707
1708 }
1709
1710
1711 /**
1712 * Assemble the celestial to terrestrial matrix from equinox-based
1713 * components (the celestial-to-true matrix, the Greenwich Apparent
1714 * Sidereal Time and the polar motion matrix).
1715 *
1716 *<p>This function is derived from the International Astronomical Union's
1717 * SOFA (Standards Of Fundamental Astronomy) software collection.
1718 *
1719 *<p>Status: support function.
1720 *
1721 *<!-- Given: -->
1722 * @param rbpn double[3][3] celestial-to-true matrix
1723 * @param gst double Greenwich (apparent) Sidereal Time (radians)
1724 * @param rpom double[3][3] polar-motion matrix
1725 *
1726 *<!-- Returned: -->
1727 * @return rc2t double[3][3] <u>returned</u> celestial-to-terrestrial matrix (Note 2)
1728 *
1729 * <p>Notes:
1730 * <ol>
1731 *
1732 * <li> This function constructs the rotation matrix that transforms
1733 * vectors in the celestial system into vectors in the terrestrial
1734 * system. It does so starting from precomputed components, namely
1735 * the matrix which rotates from celestial coordinates to the
1736 * true equator and equinox of date, the Greenwich Apparent Sidereal
1737 * Time and the polar motion matrix. One use of the present function
1738 * is when generating a series of celestial-to-terrestrial matrices
1739 * where only the Sidereal Time changes, avoiding the considerable
1740 * overhead of recomputing the precession-nutation more often than
1741 * necessary to achieve given accuracy objectives.
1742 *
1743 * <li> The relationship between the arguments is as follows:
1744 *
1745 * [TRS] = rpom * R_3(gst) * rbpn * [CRS]
1746 *
1747 * = rc2t * [CRS]
1748 *
1749 * where [CRS] is a vector in the Geocentric Celestial Reference
1750 * System and [TRS] is a vector in the International Terrestrial
1751 * Reference System (see IERS Conventions 2003).
1752 *</ol>
1753 *<p>Called:<ul>
1754 * <li>{@link #jauCr} copy r-matrix
1755 * <li>{@link #jauRz} rotate around Z-axis
1756 * <li>{@link #jauRxr} product of two r-matrices
1757 * </ul>
1758 *<p>Reference:
1759 *
1760 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
1761 * IERS Technical Note No. 32, BKG (2004)
1762 *
1763 *@version 2008 May 11
1764 *
1765 * @since Release 20101201
1766 *
1767 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
1768 */
1769 public static double[][] jauC2teqx(final double rbpn[][], final double gst, final double rpom[][] )
1770 {
1771 double r[][] = new double[3][3], rc2t[][];
1772
1773
1774 /* Construct the matrix. */
1775 jauCr(rbpn, r);
1776 jauRz(gst, r);
1777 rc2t = jauRxr(rpom, r);
1778
1779 return rc2t;
1780
1781 }
1782
1783
1784 /**
1785 * Form the celestial to terrestrial matrix given the date, the UT1,
1786 * the nutation and the polar motion. IAU 2000.
1787 *
1788 *<p>This function is derived from the International Astronomical Union's
1789 * SOFA (Standards Of Fundamental Astronomy) software collection.
1790 *
1791 *<p>Status: support function.
1792 *
1793 *<!-- Given: -->
1794 * @param tta double TT as a 2-part Julian Date (Note 1)
1795 * @param ttb double TT as a 2-part Julian Date (Note 1)
1796 * @param uta double UT1 as a 2-part Julian Date (Note 1)
1797 * @param utb double UT1 as a 2-part Julian Date (Note 1)
1798 * @param dpsi double nutation (Note 2)
1799 * @param deps double nutation (Note 2)
1800 * @param xp double coordinates of the pole (radians, Note 3)
1801 * @param yp double coordinates of the pole (radians, Note 3)
1802 *
1803 *<!-- Returned: -->
1804 * @return rc2t double[3][3] <u>returned</u> celestial-to-terrestrial matrix (Note 4)
1805 *
1806 * <p>Notes:
1807 * <ol>
1808 *
1809 * <li> The TT and UT1 dates tta+ttb and uta+utb are Julian Dates,
1810 * apportioned in any convenient way between the arguments uta and
1811 * utb. For example, JD(UT1)=2450123.7 could be expressed in any of
1812 * these ways, among others:
1813 *<pre>
1814 * uta utb
1815 *
1816 * 2450123.7 0.0 (JD method)
1817 * 2451545.0 -1421.3 (J2000 method)
1818 * 2400000.5 50123.2 (MJD method)
1819 * 2450123.5 0.2 (date &time method)
1820 *</pre>
1821 * The JD method is the most natural and convenient to use in
1822 * cases where the loss of several decimal digits of resolution is
1823 * acceptable. The J2000 and MJD methods are good compromises
1824 * between resolution and convenience. In the case of uta,utb, the
1825 * date &time method is best matched to the Earth rotation angle
1826 * algorithm used: maximum precision is delivered when the uta
1827 * argument is for 0hrs UT1 on the day in question and the utb
1828 * argument lies in the range 0 to 1, or vice versa.
1829 *
1830 * <li> The caller is responsible for providing the nutation components;
1831 * they are in longitude and obliquity, in radians and are with
1832 * respect to the equinox and ecliptic of date. For high-accuracy
1833 * applications, free core nutation should be included as well as
1834 * any other relevant corrections to the position of the CIP.
1835 *
1836 * <li> The arguments xp and yp are the coordinates (in radians) of the
1837 * Celestial Intermediate Pole with respect to the International
1838 * Terrestrial Reference System (see IERS Conventions 2003),
1839 * measured along the meridians to 0 and 90 deg west respectively.
1840 *
1841 * <li> The matrix rc2t transforms from celestial to terrestrial
1842 * coordinates:
1843 *
1844 * [TRS] = RPOM * R_3(GST) * RBPN * [CRS]
1845 *
1846 * = rc2t * [CRS]
1847 *
1848 * where [CRS] is a vector in the Geocentric Celestial Reference
1849 * System and [TRS] is a vector in the International Terrestrial
1850 * Reference System (see IERS Conventions 2003), RBPN is the
1851 * bias-precession-nutation matrix, GST is the Greenwich (apparent)
1852 * Sidereal Time and RPOM is the polar motion matrix.
1853 *
1854 * <li> Although its name does not include "00", This function is in fact
1855 * specific to the IAU 2000 models.
1856 *</ol>
1857 *<p>Called:<ul>
1858 * <li>{@link #jauPn00} bias/precession/nutation results, IAU 2000
1859 * <li>{@link #jauGmst00} Greenwich mean sidereal time, IAU 2000
1860 * <li>{@link #jauSp00} the TIO locator s', IERS 2000
1861 * <li>{@link #jauEe00} equation of the equinoxes, IAU 2000
1862 * <li>{@link #jauPom00} polar motion matrix
1863 * <li>{@link #jauC2teqx} form equinox-based celestial-to-terrestrial matrix
1864 * </ul>
1865 *<p>Reference:
1866 *
1867 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
1868 * IERS Technical Note No. 32, BKG (2004)
1869 *
1870 *@version 2009 April 1
1871 *
1872 * @since Release 20101201
1873 *
1874 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
1875 */
1876 public static double[][] jauC2tpe(final double tta, final double ttb, final double uta, final double utb,
1877 final double dpsi, final double deps, final double xp, final double yp)
1878 {
1879 double rpom[][];
1880
1881 /* Form the celestial-to-true matrix for this TT. */
1882 PrecessionNutation pn = jauPn00(tta, ttb, dpsi, deps);
1883
1884 /* Predict the Greenwich Mean Sidereal Time for this UT1 and TT. */
1885 double gmst = jauGmst00(uta, utb, tta, ttb);
1886
1887 /* Predict the equation of the equinoxes given TT and nutation. */
1888 double ee = jauEe00(tta, ttb, pn.epsa, dpsi);
1889
1890 /* Estimate s'. */
1891 double sp = jauSp00(tta, ttb);
1892
1893 /* Form the polar motion matrix. */
1894 rpom = jauPom00(xp, yp, sp);
1895
1896 /* Combine to form the celestial-to-terrestrial matrix. */
1897 double[][] rc2t = jauC2teqx(pn.rbpn, gmst + ee, rpom );
1898
1899 return rc2t;
1900
1901 }
1902
1903
1904 /**
1905 * Form the celestial to terrestrial matrix given the date, the UT1,
1906 * the CIP coordinates and the polar motion. IAU 2000.
1907 *
1908 *<p>This function is derived from the International Astronomical Union's
1909 * SOFA (Standards Of Fundamental Astronomy) software collection.
1910 *
1911 *<p>Status: support function.
1912 *
1913 *<!-- Given: -->
1914 * @param tta double TT as a 2-part Julian Date (Note 1)
1915 * @param ttb double TT as a 2-part Julian Date (Note 1)
1916 * @param uta double UT1 as a 2-part Julian Date (Note 1)
1917 * @param utb double UT1 as a 2-part Julian Date (Note 1)
1918 * @param x double Celestial Intermediate Pole (Note 2)
1919 * @param y double Celestial Intermediate Pole (Note 2)
1920 * @param xp double coordinates of the pole (radians, Note 3)
1921 * @param yp double coordinates of the pole (radians, Note 3)
1922 *
1923 *<!-- Returned: -->
1924 * @return rc2t double[3][3] <u>returned</u> celestial-to-terrestrial matrix (Note 4)
1925 *
1926 * <p>Notes:
1927 * <ol>
1928 *
1929 * <li> The TT and UT1 dates tta+ttb and uta+utb are Julian Dates,
1930 * apportioned in any convenient way between the arguments uta and
1931 * utb. For example, JD(UT1)=2450123.7 could be expressed in any o
1932 * these ways, among others:
1933 *<pre>
1934 * uta utb
1935 *
1936 * 2450123.7 0.0 (JD method)
1937 * 2451545.0 -1421.3 (J2000 method)
1938 * 2400000.5 50123.2 (MJD method)
1939 * 2450123.5 0.2 (date &time method)
1940 *</pre>
1941 * The JD method is the most natural and convenient to use in
1942 * cases where the loss of several decimal digits of resolution is
1943 * acceptable. The J2000 and MJD methods are good compromises
1944 * between resolution and convenience. In the case of uta,utb, the
1945 * date &time method is best matched to the Earth rotation angle
1946 * algorithm used: maximum precision is delivered when the uta
1947 * argument is for 0hrs UT1 on the day in question and the utb
1948 * argument lies in the range 0 to 1, or vice versa.
1949 *
1950 * <li> The Celestial Intermediate Pole coordinates are the x,y
1951 * components of the unit vector in the Geocentric Celestial
1952 * Reference System.
1953 *
1954 * <li> The arguments xp and yp are the coordinates (in radians) of the
1955 * Celestial Intermediate Pole with respect to the International
1956 * Terrestrial Reference System (see IERS Conventions 2003),
1957 * measured along the meridians to 0 and 90 deg west respectively.
1958 *
1959 * <li> The matrix rc2t transforms from celestial to terrestrial
1960 * coordinates:
1961 *
1962 * [TRS] = RPOM * R_3(ERA) * RC2I * [CRS]
1963 *
1964 * = rc2t * [CRS]
1965 *
1966 * where [CRS] is a vector in the Geocentric Celestial Reference
1967 * System and [TRS] is a vector in the International Terrestrial
1968 * Reference System (see IERS Conventions 2003), ERA is the Earth
1969 * Rotation Angle and RPOM is the polar motion matrix.
1970 *
1971 * <li> Although its name does not include "00", This function is in fact
1972 * specific to the IAU 2000 models.
1973 *</ol>
1974 *<p>Called:<ul>
1975 * <li>{@link #jauC2ixy} celestial-to-intermediate matrix, given X,Y
1976 * <li>{@link #jauEra00} Earth rotation angle, IAU 2000
1977 * <li>{@link #jauSp00} the TIO locator s', IERS 2000
1978 * <li>{@link #jauPom00} polar motion matrix
1979 * <li>{@link #jauC2tcio} form CIO-based celestial-to-terrestrial matrix
1980 * </ul>
1981 * Reference:
1982 *
1983 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
1984 * IERS Technical Note No. 32, BKG (2004)
1985 *
1986 *@version 2009 April 1
1987 *
1988 * @since Release 20101201
1989 *
1990 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
1991 */
1992 public static double[][] jauC2txy(double tta, double ttb, double uta, double utb,
1993 double x, double y, double xp, double yp)
1994 {
1995 double rc2i[][] = new double[3][3], era, sp, rpom[][] = new double[3][3];
1996
1997
1998 /* Form the celestial-to-intermediate matrix for this TT. */
1999 rc2i = jauC2ixy(tta, ttb, x, y);
2000
2001 /* Predict the Earth rotation angle for this UT1. */
2002 era = jauEra00(uta, utb);
2003
2004 /* Estimate s'. */
2005 sp = jauSp00(tta, ttb);
2006
2007 /* Form the polar motion matrix. */
2008 rpom = jauPom00(xp, yp, sp);
2009
2010 /* Combine to form the celestial-to-terrestrial matrix. */
2011 double[][] rc2t = jauC2tcio(rc2i, era, rpom );
2012
2013 return rc2t;
2014
2015 }
2016
2017 /**
2018 * Gregorian Calendar to Julian Date.
2019 *
2020 *<p>This function is derived from the International Astronomical Union's
2021 * SOFA (Standards Of Fundamental Astronomy) software collection.
2022 *
2023 *<p>Status: support function.
2024 *
2025 *<!-- Given: -->
2026 * @param iy int year in Gregorian calendar (Note 1)
2027 * @param im int month in Gregorian calendar (Note 1)
2028 * @param id int day in Gregorian calendar (Note 1)
2029 *
2030 *<!-- Returned: -->
2031 * @return d MJD zero-point: always 2400000.5
2032 * <u>returned</u> Modified Julian Date for 0 hrs
2033 *
2034 * <!-- Returned (function value): -->
2035 * @throws JSOFAIllegalParameter status:
2036 * 0 = OK
2037 * -1 = bad year (Note 3: JD not computed)
2038 * -2 = bad month (JD not computed)
2039 * -3 = bad day (JD computed)
2040 *
2041 * <p>Notes:
2042 * <ol>
2043 *
2044 * <li> The algorithm used is valid from -4800 March 1, but this
2045 * implementation rejects dates before -4799 January 1.
2046 *
2047 * <li> The Julian Date is returned in two pieces, in the usual JSOFA
2048 * manner, which is designed to preserve time resolution. The
2049 * Julian Date is available as a single number by adding djm0 and
2050 * djm.
2051 *
2052 * <li> In early eras the conversion is from the "Proleptic Gregorian
2053 * Calendar"; no account is taken of the date(s) of adoption of
2054 * the Gregorian Calendar, nor is the AD/BC numbering convention
2055 * observed.
2056 *</ol>
2057 *<p>Reference:
2058 *
2059 * <p>Explanatory Supplement to the Astronomical Almanac,
2060 * P. Kenneth Seidelmann (ed), University Science Books (1992),
2061 * Section 12.92 (p604).
2062 *
2063 *@version 2009 October 19
2064 *
2065 * @since Release 20101201
2066 *
2067 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
2068 */
2069 public static JulianDate jauCal2jd(int iy, int im, int id) throws JSOFAIllegalParameter
2070 {
2071 int ly, my;
2072 long iypmy;
2073 double djm0, djm;
2074
2075 /* Earliest year allowed (4800BC) */
2076 final int IYMIN = -4799;
2077
2078 /* Month lengths in days */
2079 final int mtab[]
2080 = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
2081
2082
2083 /* Validate year and month. */
2084 if (iy < IYMIN) throw new JSOFAIllegalParameter("bad year", -1);
2085 if (im < 1 || im > 12) throw new JSOFAIllegalParameter("bad month", -2);
2086
2087 /* If February in a leap year, 1, otherwise 0. */
2088 ly = ((im == 2) &&(iy%4 == 0) && (iy%100 != 0 || (iy%400 == 0)))?1:0;
2089
2090 /* Validate day, taking into account leap years. */
2091 if ( (id < 1) || (id > (mtab[im-1] + ly))) {
2092 }
2093
2094 /* Return result. */
2095 my = (im - 14) / 12;
2096 iypmy = (long) (iy + my);
2097 djm0 = DJM0;
2098 djm = (double)((1461L * (iypmy + 4800L)) / 4L
2099 + (367L * (long) (im - 2 - 12 * my)) / 12L
2100 - (3L * ((iypmy + 4900L) / 100L)) / 4L
2101 + (long) id - 2432076L);
2102
2103 /* Return status. */
2104 return new JulianDate(djm0, djm);
2105
2106 }
2107
2108
2109 /**
2110 * Copy a p-vector.
2111 *
2112 *<p>This function is derived from the International Astronomical Union's
2113 * SOFA (Standards Of Fundamental Astronomy) software collection.
2114 *
2115 *<p>Status: vector/matrix support function.
2116 *
2117 *<!-- Given: -->
2118 * @param p double[3] p-vector to be copied
2119 *
2120 *<!-- Returned: -->
2121 * @param c double[3] <u>given and returned</u> copy
2122 * @return double[3] <u>given and returned</u> copy
2123 *
2124 *@version 2008 May 11
2125 *
2126 * @since Release 20101201
2127 *
2128 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
2129 */
2130 public static double[] jauCp(double p[], double c[])
2131 {
2132
2133 c[0] = p[0];
2134 c[1] = p[1];
2135 c[2] = p[2];
2136
2137 return c;
2138
2139 }
2140
2141
2142 /**
2143 * Copy a position/velocity vector.
2144 *
2145 *<p>This function is derived from the International Astronomical Union's
2146 * SOFA (Standards Of Fundamental Astronomy) software collection.
2147 *
2148 *<p>Status: vector/matrix support function.
2149 *
2150 *<!-- Given: -->
2151 * @param pv double[2][3] position/velocity vector to be copied
2152 * @param c double[2][3] <u>returned</u> copy
2153 *
2154 *<!-- Returned: -->
2155 * @return double[2][3] <u>returned c</u> copy
2156 *
2157 *<p>Called:<ul>
2158 * <li>{@link #jauCp} copy p-vector
2159 * </ul>
2160 *@version 2008 May 11
2161 *
2162 * @since Release 20101201
2163 *
2164 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
2165 */
2166 public static double[][] jauCpv(double pv[][], double c[][])
2167 {
2168
2169 c[0]=jauCp(pv[0], c[0]);
2170 c[1]=jauCp(pv[1], c[1]);
2171
2172 return c;
2173
2174 }
2175
2176
2177 /**
2178 * Copy an r-matrix.
2179 *
2180 *<p>This function is derived from the International Astronomical Union's
2181 * SOFA (Standards Of Fundamental Astronomy) software collection.
2182 *
2183 *<p>Status: vector/matrix support function.
2184 *
2185 *<!-- Given: -->
2186 * @param r double[3][3] r-matrix to be copied.
2187 *
2188 *<!-- Returned: -->
2189 * @param c double[3][3] <u>given and returned</u> the elements of r are copied into this.
2190 *
2191 *<p>Called:<ul>
2192 * <li>{@link #jauCp} copy p-vector
2193 * </ul>
2194 *@version 2008 May 11
2195 *
2196 * @since Release 20101201
2197 *
2198 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
2199 */
2200 public static void jauCr(double r[][], double c[][] )
2201 {
2202
2203 jauCp(r[0], c[0]);
2204 jauCp(r[1], c[1]);
2205 jauCp(r[2], c[2]);
2206
2207 return;
2208
2209 }
2210
2211
2212 /**
2213 * Decompose days to hours, minutes, seconds, fraction.
2214 *
2215 *<p>This function is derived from the International Astronomical Union's
2216 * SOFA (Standards Of Fundamental Astronomy) software collection.
2217 *
2218 *<p>Status: vector/matrix support function.
2219 *
2220 *<!-- Given: -->
2221 * @param ndp int resolution (Note 1)
2222 * @param days double interval in days
2223 *
2224 *<!-- Returned: -->
2225 * @param ihmsf int[4] <u>returned</u> hours, minutes, seconds, fraction
2226 * @return sign char <u>returned</u> '+' or '-'
2227 *
2228 * <p>Notes:
2229 * <ol>
2230 *
2231 * <li> The argument ndp is interpreted as follows:
2232 *
2233 * ndp resolution
2234 * : ...0000 00 00
2235 * -7 1000 00 00
2236 * -6 100 00 00
2237 * -5 10 00 00
2238 * -4 1 00 00
2239 * -3 0 10 00
2240 * -2 0 01 00
2241 * -1 0 00 10
2242 * 0 0 00 01
2243 * 1 0 00 00.1
2244 * 2 0 00 00.01
2245 * 3 0 00 00.001
2246 * : 0 00 00.000...
2247 *
2248 * <li> The largest positive useful value for ndp is determined by the
2249 * size of days, the format of double on the target platform, and
2250 * the risk of overflowing ihmsf[3]. On a typical platform, for
2251 * days up to 1.0, the available floating-point precision might
2252 * correspond to ndp=12. However, the practical limit is typically
2253 * ndp=9, set by the capacity of a 32-bit int, or ndp=4 if int is
2254 * only 16 bits.
2255 *
2256 * <li> The absolute value of days may exceed 1.0. In cases where it
2257 * does not, it is up to the caller to test for and handle the
2258 * case where days is very nearly 1.0 and rounds up to 24 hours,
2259 * by testing for ihms[0]=24 and setting ihmsf[0-3] to zero.
2260 *</ol>
2261 *@version 2008 May 11
2262 *
2263 * @since Release 20101201
2264 *
2265 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
2266 */
2267 public static char jauD2tf(final int ndp, final double days, int ihmsf[])
2268 {
2269 int nrs, n;
2270 double rs, rm, rh, a, w, ah, am, as, af;
2271
2272
2273 /* Handle sign. */
2274 char sign = (char) ( ( days >= 0.0 ) ? '+' : '-' );
2275
2276 /* Interval in seconds. */
2277 a = DAYSEC * abs(days);
2278
2279 /* Pre-round if resolution coarser than 1s (then pretend ndp=1). */
2280 if (ndp < 0) {
2281 nrs = 1;
2282 for (n = 1; n <= -ndp; n++) {
2283 nrs *= (n == 2 || n == 4) ? 6 : 10;
2284 }
2285 rs = (double) nrs;
2286 w = a / rs;
2287 a = rs * dnint(w);
2288 }
2289
2290 /* Express the unit of each field in resolution units. */
2291 nrs = 1;
2292 for (n = 1; n <= ndp; n++) {
2293 nrs *= 10;
2294 }
2295 rs = (double) nrs;
2296 rm = rs * 60.0;
2297 rh = rm * 60.0;
2298
2299 /* Round the interval and express in resolution units. */
2300 a = dnint(rs * a);
2301
2302 /* Break into fields. */
2303 ah = a / rh;
2304 ah = dint(ah);
2305 a -= ah * rh;
2306 am = a / rm;
2307 am = dint(am);
2308 a -= am * rm;
2309 as = a / rs;
2310 as = dint(as);
2311 af = a - as * rs;
2312
2313 /* Return results. */
2314 ihmsf[0] = (int) ah;
2315 ihmsf[1] = (int) am;
2316 ihmsf[2] = (int) as;
2317 ihmsf[3] = (int) af;
2318
2319 return sign;
2320
2321 }
2322
2323 /**
2324 * Representation of Gregorian Calendar with fractional day.
2325 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
2326 *
2327 * @since AIDA Stage 1
2328 */
2329 public static class Calendar {
2330 public final int iy;
2331 public final int im;
2332 public final int id;
2333 public final double fd;
2334 public Calendar (int iy, int im, int id, double fd)
2335 {
2336 this.iy = iy;
2337 this.im = im;
2338 this.id = id;
2339 this.fd = fd;
2340 }
2341 }
2342
2343 /**
2344 * Representation of Gregorian Calendar with integer hours minutes and seconds.
2345 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
2346 *
2347 * @since AIDA Stage 1
2348 */
2349 public static class CalendarHMS {
2350 public final int iy;
2351 public final int im;
2352 public final int id;
2353 public final int ihmsf[];
2354 public CalendarHMS (int iy, int im, int id, int hmsf[]){
2355 this.iy = iy;
2356 this.im = im;
2357 this.id = id;
2358 this.ihmsf = hmsf;
2359 }
2360 }
2361
2362 /**
2363 *
2364 * Format for output a 2-part Julian Date (or in the case of UTC a
2365 * quasi-JD form that includes special provision for leap seconds).
2366 *
2367 *<p>This function is derived from the International Astronomical Union's
2368 * SOFA (Standards of Fundamental Astronomy) software collection.
2369 *
2370 *<p>Status: support function.
2371 *
2372 *<!-- Given: -->
2373 * @param scale char[] time scale ID (Note 1)
2374 * @param ndp int resolution (Note 2)
2375 * @param d1 double time as a 2-part Julian Date (Notes 3,4)
2376 * @param d2 double time as a 2-part Julian Date (Notes 3,4)
2377 *
2378 *<!-- Returned:-->
2379 * iy,im,id int year, month, day in Gregorian calendar (Note 5)
2380 * ihmsf int[4] hours, minutes, seconds, fraction (Note 1)
2381 *
2382 * Returned (function value):
2383 * int status: +1 = dubious year (Note 5)
2384 * 0 = OK
2385 * -1 = unacceptable date (Note 6)
2386 *
2387 *<p>Notes:
2388 *<ol>
2389 * <li> scale identifies the time scale. Only the value "UTC" (in upper
2390 * case) is significant, and enables handling of leap seconds (see
2391 * Note 4).
2392 *
2393 * <li> ndp is the number of decimal places in the seconds field, and can
2394 * have negative as well as positive values, such as:
2395 *
2396 * ndp resolution
2397 * -4 1 00 00
2398 * -3 0 10 00
2399 * -2 0 01 00
2400 * -1 0 00 10
2401 * 0 0 00 01
2402 * 1 0 00 00.1
2403 * 2 0 00 00.01
2404 * 3 0 00 00.001
2405 *
2406 * The limits are platform dependent, but a safe range is -5 to +9.
2407 *
2408 * <li> d1+d2 is Julian Date, apportioned in any convenient way between
2409 * the two arguments, for example where d1 is the Julian Day Number
2410 * and d2 is the fraction of a day. In the case of UTC, where the
2411 * use of JD is problematical, special conventions apply: see the
2412 * next note.
2413 *
2414 * <li> JD cannot unambiguously represent UTC during a leap second unless
2415 * special measures are taken. The SOFA internal convention is that
2416 * the quasi-JD day represents UTC days whether the length is 86399,
2417 * 86400 or 86401 SI seconds. In the 1960-1972 era there were
2418 * smaller jumps (in either direction) each time the linear UTC(TAI)
2419 * expression was changed, and these "mini-leaps" are also included
2420 * in the SOFA convention.
2421 *
2422 * <li> The warning status "dubious year" flags UTCs that predate the
2423 * introduction of the time scale or that are too far in the future
2424 * to be trusted. See iauDat for further details.
2425 *
2426 * <li> For calendar conventions and limitations, see iauCal2jd.
2427 *</ol>
2428 * Called:
2429 * iauJd2cal JD to Gregorian calendar
2430 * iauD2tf decompose days to hms
2431 * iauDat delta(AT) = TAI-UTC
2432 *
2433 *@version 2014 February 15
2434 *
2435 *@since JSOFA release 20131202
2436 *
2437 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
2438 * @throws JSOFAInternalError an internal error has occured
2439 * @throws JSOFAIllegalParameter
2440 */
2441 public static CalendarHMS jauD2dtf(final String scale, int ndp, double d1, double d2 ) throws JSOFAIllegalParameter, JSOFAInternalError
2442 {
2443 boolean leap;
2444 int iy1, im1, id1, iy2, im2, id2, ihmsf1[] = new int[4];
2445 double a1, b1, fd, dat0, dat12, dat24, dleap;
2446
2447
2448 /* The two-part JD. */
2449 a1 = d1;
2450 b1 = d2;
2451
2452 /* Provisional calendar date. */
2453 Calendar cal = jauJd2cal(a1, b1);
2454 iy1 = cal.iy;
2455 im1 = cal.im;
2456 id1 = cal.id;
2457 fd = cal.fd;
2458
2459 /* Is this a leap second day? */
2460 leap = false;
2461 if ( scale.equalsIgnoreCase("UTC") ) {
2462
2463 /* TAI-UTC at 0h today. */
2464 dat0 = jauDat(iy1, im1, id1, 0.0 );
2465
2466 /* TAI-UTC at 12h today (to detect drift). */
2467 dat12 = jauDat(iy1, im1, id1, 0.5);
2468
2469 /* TAI-UTC at 0h tomorrow (to detect jumps). */
2470 cal = jauJd2cal(a1+1.5, b1-fd);
2471 iy2 = cal.iy;
2472 im2 = cal.im;
2473 id2 = cal.id;
2474 dat24 = jauDat(iy2, im2, id2, 0.0);
2475
2476 /* Any sudden change in TAI-UTC (seconds). */
2477 dleap = dat24 - (2.0*dat12 - dat0);
2478
2479 /* If leap second day, scale the fraction of a day into SI. */
2480 leap = (dleap != 0.0);
2481 if (leap) fd += fd * dleap/DAYSEC;
2482 }
2483
2484 jauD2tf ( ndp, fd, ihmsf1 );
2485
2486 /* Has the (rounded) time gone past 24h? */
2487 if ( ihmsf1[0] > 23 ) {
2488
2489 /* Yes. We probably need tomorrow's calendar date. */
2490 cal = jauJd2cal(a1+1.5, b1-fd);
2491 iy2 = cal.iy; im2 = cal.im; id2 = cal.id;
2492
2493 /* Is today a leap second day? */
2494 if ( ! leap ) {
2495
2496 /* No. Use 0h tomorrow. */
2497 iy1 = iy2;
2498 im1 = im2;
2499 id1 = id2;
2500 ihmsf1[0] = 0;
2501 ihmsf1[1] = 0;
2502 ihmsf1[2] = 0;
2503
2504 } else {
2505
2506 /* Yes. Are we past the leap second itself? */
2507 if ( ihmsf1[2] > 0 ) {
2508
2509 /* Yes. Use tomorrow but allow for the leap second. */
2510 iy1 = iy2;
2511 im1 = im2;
2512 id1 = id2;
2513 ihmsf1[0] = 0;
2514 ihmsf1[1] = 0;
2515 ihmsf1[2] = 0;
2516
2517 } else {
2518
2519 /* No. Use 23 59 60... today. */
2520 ihmsf1[0] = 23;
2521 ihmsf1[1] = 59;
2522 ihmsf1[2] = 60;
2523 }
2524
2525 /* If rounding to 10s or coarser always go up to new day. */
2526 if ( ndp < 0 && ihmsf1[2] == 60 ) {
2527 iy1 = iy2;
2528 im1 = im2;
2529 id1 = id2;
2530 ihmsf1[0] = 0;
2531 ihmsf1[1] = 0;
2532 ihmsf1[2] = 0;
2533 }
2534 }
2535 }
2536
2537 /* Results. */
2538
2539 return new CalendarHMS(iy1, im1, id1, ihmsf1);
2540
2541 }
2542
2543 /**
2544 * Encode date and time fields into 2-part Julian Date (or in the case
2545 * of UTC a quasi-JD form that includes special provision for leap
2546 * seconds).
2547 *
2548 *<p>This function is derived from the International Astronomical Union's
2549 * SOFA (Standards of Fundamental Astronomy) software collection.
2550 *
2551 * <p>Status: support function.
2552 *
2553 * <!-- Given: -->
2554 * @param scale char time scale ID (Note 1)
2555 * @param iy int year in Gregorian calendar (Note 2)
2556 * @param im int month in Gregorian calendar (Note 2)
2557 * @param id int day in Gregorian calendar (Note 2)
2558 * @param ihr int hour
2559 * @param imn int minute
2560 * @param sec double seconds
2561 *
2562 * <!-- Returned: -->
2563 * @return 2-part Julian Date (Notes 3,4)
2564 *
2565 * @throws JSOFAIllegalParameter
2566 *
2567 * @throws JSOFAInternalError {@code status: +3 = both of next two
2568 * +2 = time is after end of day (Note 5)
2569 * +1 = dubious year (Note 6)
2570 * 0 = OK
2571 * -1 = bad year
2572 * -2 = bad month
2573 * -3 = bad day
2574 * -4 = bad hour
2575 * -5 = bad minute
2576 * -6 = bad second (<0)}
2577 *
2578 *<p>Notes:
2579 *<ol>
2580 * <li> scale identifies the time scale. Only the value "UTC" (in upper
2581 * case) is significant, and enables handling of leap seconds (see
2582 * Note 4).
2583 *
2584 * <li> For calendar conventions and limitations, see iauCal2jd.
2585 *
2586 * <li> The sum of the results, d1+d2, is Julian Date, where normally d1
2587 * is the Julian Day Number and d2 is the fraction of a day. In the
2588 * case of UTC, where the use of JD is problematical, special
2589 * conventions apply: see the next note.
2590 *
2591 * <li> JD cannot unambiguously represent UTC during a leap second unless
2592 * special measures are taken. The SOFA internal convention is that
2593 * the quasi-JD day represents UTC days whether the length is 86399,
2594 * 86400 or 86401 SI seconds. In the 1960-1972 era there were
2595 * smaller jumps (in either direction) each time the linear UTC(TAI)
2596 * expression was changed, and these "mini-leaps" are also included
2597 * in the SOFA convention.
2598 *
2599 * <li> The warning status "time is after end of day" usually means that
2600 * the sec argument is greater than 60.0. However, in a day ending
2601 * in a leap second the limit changes to 61.0 (or 59.0 in the case
2602 * of a negative leap second).
2603 *
2604 * <li> The warning status "dubious year" flags UTCs that predate the
2605 * introduction of the time scale or that are too far in the future
2606 * to be trusted. See iauDat for further details.
2607 *
2608 * <li> Only in the case of continuous and regular time scales (TAI, TT,
2609 * TCG, TCB and TDB) is the result d1+d2 a Julian Date, strictly
2610 * speaking. In the other cases (UT1 and UTC) the result must be
2611 * used with circumspection; in particular the difference between
2612 * two such results cannot be interpreted as a precise time
2613 * interval.
2614 *</ol>
2615 * Called:
2616 * iauCal2jd Gregorian calendar to JD
2617 * iauDat delta(AT) = TAI-UTC
2618 * iauJd2cal JD to Gregorian calendar
2619 *
2620 *@version 2013 July 26
2621 *
2622 *@since JSOFA release 20131202
2623 *
2624 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
2625 */
2626 public static JulianDate jauDtf2d(final String scale, int iy, int im, int id,
2627 int ihr, int imn, double sec) throws JSOFAIllegalParameter, JSOFAInternalError
2628 {
2629 int js = 0, iy2, im2, id2;
2630 double dj, w, day, seclim, dat0, dat12, dat24, dleap, time;
2631
2632
2633 /* Today's Julian Day Number. */
2634 JulianDate jd = jauCal2jd(iy, im, id);
2635 dj = jd.djm0; w = jd.djm1;
2636 dj += w;
2637
2638 /* Day length and final minute length in seconds (provisional). */
2639 day = DAYSEC;
2640 seclim = 60.0;
2641
2642 /* Deal with the UTC leap second case. */
2643 if ( scale.equals("UTC") ) {
2644
2645 /* TAI-UTC at 0h today. */
2646 dat0 = jauDat(iy, im, id, 0.0);
2647
2648 /* TAI-UTC at 12h today (to detect drift). */
2649 dat12 = jauDat(iy, im, id, 0.5);
2650
2651 /* TAI-UTC at 0h tomorrow (to detect jumps). */
2652 Calendar cal = jauJd2cal ( dj, 1.5);
2653 iy2 = cal.iy; im2 = cal.im; id2 = cal.id; w = cal.fd;
2654
2655 dat24 = jauDat(iy2, im2, id2, 0.0);
2656
2657 /* Any sudden change in TAI-UTC between today and tomorrow. */
2658 dleap = dat24 - (2.0*dat12 - dat0);
2659
2660 /* If leap second day, correct the day and final minute lengths. */
2661 day += dleap;
2662 if ( ihr == 23 && imn == 59 ) seclim += dleap;
2663
2664 /* End of UTC-specific actions. */
2665 }
2666
2667 /* Validate the time. */
2668 if ( ihr >= 0 && ihr <= 23 ) {
2669 if ( imn >= 0 && imn <= 59 ) {
2670 if ( sec >= 0 ) {
2671 if ( sec >= seclim ) {
2672 js += 2;
2673 }
2674 } else {
2675 js = -6;
2676 }
2677 } else {
2678 js = -5;
2679 }
2680 } else {
2681 js = -4;
2682 }
2683 if ( js < 0 ) throw new JSOFAInternalError("problem with time", js);
2684
2685 /* The time in days. */
2686 time = ( 60.0 * ( (double) ( 60 * ihr + imn ) ) + sec ) / day;
2687
2688 /* Return the date and time. */
2689 return new JulianDate(dj, time) ;
2690
2691 }
2692
2693
2694
2695 /** Release year for this version of jauDat {@value} */
2696 public final static int IYV = 2016;
2697 static class LeapInfo {
2698 final public int iyear, month;
2699 final public double delat;
2700 public LeapInfo(int i, int m, double t) {
2701 iyear = i;
2702 month = m;
2703 delat = t;
2704 }
2705 }
2706
2707 /* Dates and Delta(AT)s */
2708 static final LeapInfo leapSeconds[] = {
2709 new LeapInfo( 1960, 1, 1.4178180 ),
2710 new LeapInfo( 1961, 1, 1.4228180 ),
2711 new LeapInfo( 1961, 8, 1.3728180 ),
2712 new LeapInfo( 1962, 1, 1.8458580 ),
2713 new LeapInfo( 1963, 11, 1.9458580 ),
2714 new LeapInfo( 1964, 1, 3.2401300 ),
2715 new LeapInfo( 1964, 4, 3.3401300 ),
2716 new LeapInfo( 1964, 9, 3.4401300 ),
2717 new LeapInfo( 1965, 1, 3.5401300 ),
2718 new LeapInfo( 1965, 3, 3.6401300 ),
2719 new LeapInfo( 1965, 7, 3.7401300 ),
2720 new LeapInfo( 1965, 9, 3.8401300 ),
2721 new LeapInfo( 1966, 1, 4.3131700 ),
2722 new LeapInfo( 1968, 2, 4.2131700 ),
2723 new LeapInfo( 1972, 1, 10.0 ),
2724 new LeapInfo( 1972, 7, 11.0 ),
2725 new LeapInfo( 1973, 1, 12.0 ),
2726 new LeapInfo( 1974, 1, 13.0 ),
2727 new LeapInfo( 1975, 1, 14.0 ),
2728 new LeapInfo( 1976, 1, 15.0 ),
2729 new LeapInfo( 1977, 1, 16.0 ),
2730 new LeapInfo( 1978, 1, 17.0 ),
2731 new LeapInfo( 1979, 1, 18.0 ),
2732 new LeapInfo( 1980, 1, 19.0 ),
2733 new LeapInfo( 1981, 7, 20.0 ),
2734 new LeapInfo( 1982, 7, 21.0 ),
2735 new LeapInfo( 1983, 7, 22.0 ),
2736 new LeapInfo( 1985, 7, 23.0 ),
2737 new LeapInfo( 1988, 1, 24.0 ),
2738 new LeapInfo( 1990, 1, 25.0 ),
2739 new LeapInfo( 1991, 1, 26.0 ),
2740 new LeapInfo( 1992, 7, 27.0 ),
2741 new LeapInfo( 1993, 7, 28.0 ),
2742 new LeapInfo( 1994, 7, 29.0 ),
2743 new LeapInfo( 1996, 1, 30.0 ),
2744 new LeapInfo( 1997, 7, 31.0 ),
2745 new LeapInfo( 1999, 1, 32.0 ),
2746 new LeapInfo( 2006, 1, 33.0 ),
2747 new LeapInfo( 2009, 1, 34.0 ),
2748 new LeapInfo( 2012, 7, 35.0 ),
2749 new LeapInfo( 2015, 7, 36.0 ),
2750 new LeapInfo( 2017, 1, 37.0 )
2751 };
2752
2753 /**
2754 * For a given UTC date, calculate delta(AT) = TAI-UTC.
2755 *<pre>
2756 * :------------------------------------------:
2757 * : :
2758 * : IMPORTANT :
2759 * : :
2760 * : A new version of this function must be :
2761 * : produced whenever a new leap second is :
2762 * : announced. There are four items to :
2763 * : change on each such occasion: :
2764 * : :
2765 * : 1) A new line must be added to the set :
2766 * : of statements that initialize the :
2767 * : array "changes". :
2768 * : :
2769 * : 2) The parameter IYV must be set to :
2770 * : the current year. :
2771 * : :
2772 * : 3) The "Latest leap second" comment :
2773 * : below must be set to the new leap :
2774 * : second date. :
2775 * : :
2776 * : 4) The "This revision" comment, later, :
2777 * : must be set to the current date. :
2778 * : :
2779 * : Change (2) must also be carried out :
2780 * : whenever the function is re-issued, :
2781 * : even if no leap seconds have been :
2782 * : added. :
2783 * : :
2784 * : Latest leap second: 2017 Jan 01 :
2785 * : :
2786 * :__________________________________________:
2787 *</pre>
2788 *<p>This function is derived from the International Astronomical Union's
2789 * SOFA (Standards Of Fundamental Astronomy) software collection.
2790 *
2791 *<p>Status: support function.
2792 *
2793 *<!-- Given: -->
2794 * @param iy int UTC: year (Notes 1 and 2)
2795 * @param im int month (Note 2)
2796 * @param id int day (Notes 2 and 3)
2797 * @param fd double fraction of day (Note 4)
2798 *
2799 *<!-- Returned: -->
2800 * @return deltat double <u>returned</u> TAI minus UTC, seconds
2801 *
2802 * @throws JSOFAIllegalParameter status (Note 5):
2803 * 1 = dubious year (Note 1)
2804 * 0 = OK
2805 * -1 = bad year
2806 * -2 = bad month
2807 * -3 = bad day (Note 3)
2808 * -4 = bad fraction (Note 4)
2809 *
2810 * <p>Notes:
2811 * <ol>
2812 *
2813 * <li> UTC began at 1960 January 1.0 (JD 2436934.5) and it is improper
2814 * to call the function with an earlier date. If this is attempted,
2815 * zero is returned together with a warning status.
2816 *
2817 * Because leap seconds cannot, in principle, be predicted in
2818 * advance, a reliable check for dates beyond the valid range is
2819 * impossible. To guard against gross errors, a year five or more
2820 * after the release year of the present function (see parameter
2821 * IYV) is considered dubious. In this case a warning status is
2822 * returned but the result is computed in the normal way.
2823 *
2824 * For both too-early and too-late years, the warning status is
2825 * j=+1. This is distinct from the error status j=-1, which
2826 * signifies a year so early that JD could not be computed.
2827 *
2828 * <li> If the specified date is for a day which ends with a leap second,
2829 * the TAI-UTC value returned is for the period leading up to the
2830 * leap second. If the date is for a day which begins as a leap
2831 * second ends, the TAI-UTC returned is for the period following the
2832 * leap second.
2833 *
2834 * <li> The day number must be in the normal calendar range, for example
2835 * 1 through 30 for April. The "almanac" convention of allowing
2836 * such dates as January 0 and December 32 is not supported in this
2837 * function, in order to avoid confusion near leap seconds.
2838 *
2839 * <li> The fraction of day is used only for dates before the
2840 * introduction of leap seconds, the first of which occurred at the
2841 * end of 1971. It is tested for validity (zero to less than 1 is
2842 * the valid range) even if not used; if invalid, zero is used and
2843 * status j=-4 is returned. For many applications, setting fd to
2844 * zero is acceptable; the resulting error is always less than 3 ms
2845 * (and occurs only pre-1972).
2846 *
2847 * <li> The status value returned in the case where there are multiple
2848 * errors refers to the first error detected. For example, if the
2849 * month and day are 13 and 32 respectively, j=-2 (bad month)
2850 * will be returned.
2851 *
2852 * <li> In cases where a valid result is not available, zero is returned.
2853 *
2854 *<p>References:
2855 *
2856 * <li> For dates from 1961 January 1 onwards, the expressions from the
2857 * file ftp://maia.usno.navy.mil/ser7/tai-utc.dat are used.
2858 *
2859 * <li> The 5ms timestep at 1961 January 1 is taken from 2.58.1 (p87) of
2860 * the 1992 Explanatory Supplement.
2861 *</ol>
2862 *<p>Called:<ul>
2863 * <li>{@link #jauCal2jd} Gregorian calendar to Julian Day number
2864 * </ul>
2865 *<p>@version 20160729
2866 *
2867 * @since Release 20101201
2868 *
2869 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
2870 */
2871 public static double jauDat(int iy, int im, int id, double fd ) throws JSOFAIllegalParameter, JSOFAInternalError
2872 {
2873
2874 /* Reference dates (MJD) and drift rates (s/day), pre leap seconds */
2875 final double drift[][] = {
2876 { 37300.0, 0.0012960 },
2877 { 37300.0, 0.0012960 },
2878 { 37300.0, 0.0012960 },
2879 { 37665.0, 0.0011232 },
2880 { 37665.0, 0.0011232 },
2881 { 38761.0, 0.0012960 },
2882 { 38761.0, 0.0012960 },
2883 { 38761.0, 0.0012960 },
2884 { 38761.0, 0.0012960 },
2885 { 38761.0, 0.0012960 },
2886 { 38761.0, 0.0012960 },
2887 { 38761.0, 0.0012960 },
2888 { 39126.0, 0.0025920 },
2889 { 39126.0, 0.0025920 }
2890 };
2891
2892 /* Number of Delta(AT) expressions before leap seconds were introduced */
2893 final int NERA1 = drift.length;
2894
2895
2896 /* Number of Delta(AT) changes */
2897 final int NDAT = leapSeconds.length;
2898
2899 /* Miscellaneous local variables */
2900 int i, m;
2901 double da, djm;
2902
2903
2904 /* Initialize the result to zero. */
2905 double deltat = da = 0.0;
2906
2907 /* If invalid fraction of a day, set error status and give up. */
2908 if (fd < 0.0 || fd > 1.0) throw new JSOFAIllegalParameter("bad day fraction", -4);
2909
2910 /* Convert the date into an MJD. */
2911 JulianDate jd = jauCal2jd(iy, im, id);
2912 djm = jd.djm1;
2913
2914 /* If pre-UTC year, set warning status and give up. */
2915 if (iy < leapSeconds[0].iyear) throw new JSOFAInternalError("year before UTC start", 1);
2916
2917 /* If suspiciously late year, set warning status but proceed. */
2918 if (iy > IYV + 5) {
2919 }
2920
2921 /* Combine year and month to form a date-ordered integer... */
2922 m = 12*iy + im;
2923
2924 /* ...and use it to find the preceding table entry. */
2925 for (i = NDAT-1; i >=0; i--) {
2926 if (m >= (12 * leapSeconds[i].iyear + leapSeconds[i].month)) break;
2927 }
2928
2929 /* Get the Delta(AT). */
2930 da = leapSeconds[i].delat;
2931
2932 /* If pre-1972, adjust for drift. */
2933 if (i < NERA1) da += (djm + fd - drift[i][0]) * drift[i][1];
2934
2935 /* Return the Delta(AT) value. */
2936 deltat = da;
2937
2938 /* Return the value. */
2939 return deltat;
2940
2941 }
2942
2943
2944 /**
2945 * An approximation to TDB-TT, the difference between barycentric
2946 * dynamical time and terrestrial time, for an observer on the Earth.
2947 *
2948 * The different time scales - proper, coordinate and realized - are
2949 * related to each other:
2950 * {@code
2951 * TAI <- physically realized
2952 * :
2953 * offset <- observed (nominally +32.184s)
2954 * :
2955 * TT <- terrestrial time
2956 * :
2957 * rate adjustment (L_G) <- definition of TT
2958 * :
2959 * TCG <- time scale for GCRS
2960 * :
2961 * "periodic" terms <- jauDtdb is an implementation
2962 * :
2963 * rate adjustment (L_C) <- function of solar-system ephemeris
2964 * :
2965 * TCB <- time scale for BCRS
2966 * :
2967 * rate adjustment (-L_B) <- definition of TDB
2968 * :
2969 * TDB <- TCB scaled to track TT
2970 * :
2971 * "periodic" terms <- -jau_DTDB is an approximation
2972 * :
2973 * TT <- terrestrial time
2974 *}
2975 * Adopted values for the various constants can be found in the IERS
2976 * Conventions (McCarthy & Petit 2003).
2977 *
2978 *<p>This function is derived from the International Astronomical Union's
2979 * SOFA (Standards Of Fundamental Astronomy) software collection.
2980 *
2981 *<p>Status: canonical model.
2982 *
2983 *<!-- Given: -->
2984 * @param date1 double date, TDB (Notes 1-3)
2985 * @param date2 double date, TDB (Notes 1-3)
2986 * @param ut double universal time (UT1, fraction of one day)
2987 * @param elong double longitude (east positive, radians)
2988 * @param u double distance from Earth spin axis (km)
2989 * @param v double distance north of equatorial plane (km)
2990 *
2991 * <!-- Returned (function value): -->
2992 * @return @return double TDB-TT (seconds)
2993 *
2994 * <p>Notes:
2995 * <ol>
2996 *
2997 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
2998 * convenient way between the two arguments. For example,
2999 * JD(TT)=2450123.7 could be expressed in any of these ways,
3000 * among others:
3001 *<pre>
3002 * date1 date2
3003 *
3004 * 2450123.7 0.0 (JD method)
3005 * 2451545.0 -1421.3 (J2000 method)
3006 * 2400000.5 50123.2 (MJD method)
3007 * 2450123.5 0.2 (date & time method)
3008 *</pre>
3009 * The JD method is the most natural and convenient to use in
3010 * cases where the loss of several decimal digits of resolution
3011 * is acceptable. The J2000 method is best matched to the way
3012 * the argument is handled internally and will deliver the
3013 * optimum resolution. The MJD method and the date & time methods
3014 * are both good compromises between resolution and convenience.
3015 *
3016 * Although the date is, formally, barycentric dynamical time (TDB),
3017 * the terrestrial dynamical time (TT) can be used with no practical
3018 * effect on the accuracy of the prediction.
3019 *
3020 * <li> TT can be regarded as a coordinate time that is realized as an
3021 * offset of 32.184s from International Atomic Time, TAI. TT is a
3022 * specific linear transformation of geocentric coordinate time TCG,
3023 * which is the time scale for the Geocentric Celestial Reference
3024 * System, GCRS.
3025 *
3026 * <li> TDB is a coordinate time, and is a specific linear transformation
3027 * of barycentric coordinate time TCB, which is the time scale for
3028 * the Barycentric Celestial Reference System, BCRS.
3029 *
3030 * <li> The difference TCG-TCB depends on the masses and positions of the
3031 * bodies of the solar system and the velocity of the Earth. It is
3032 * dominated by a rate difference, the residual being of a periodic
3033 * character. The latter, which is modeled by the present function,
3034 * comprises a main (annual) sinusoidal term of amplitude
3035 * approximately 0.00166 seconds, plus planetary terms up to about
3036 * 20 microseconds, and lunar and diurnal terms up to 2 microseconds.
3037 * These effects come from the changing transverse Doppler effect
3038 * and gravitational red-shift as the observer (on the Earth's
3039 * surface) experiences variations in speed (with respect to the
3040 * BCRS) and gravitational potential.
3041 *
3042 * <li> TDB can be regarded as the same as TCB but with a rate adjustment
3043 * to keep it close to TT, which is convenient for many applications.
3044 * The history of successive attempts to define TDB is set out in
3045 * Resolution 3 adopted by the IAU General Assembly in 2006, which
3046 * defines a fixed TDB(TCB) transformation that is consistent with
3047 * contemporary solar-system ephemerides. Future ephemerides will
3048 * imply slightly changed transformations between TCG and TCB, which
3049 * could introduce a linear drift between TDB and TT; however, any
3050 * such drift is unlikely to exceed 1 nanosecond per century.
3051 *
3052 * <li> The geocentric TDB-TT model used in the present function is that of
3053 * Fairhead & Bretagnon (1990), in its full form. It was originally
3054 * supplied by Fairhead (private communications with P.T.Wallace,
3055 * 1990) as a Fortran subroutine. The present C function contains an
3056 * adaptation of the Fairhead code. The numerical results are
3057 * essentially unaffected by the changes, the differences with
3058 * respect to the Fairhead & Bretagnon original being at the 1e-20 s
3059 * level.
3060 *
3061 * The topocentric part of the model is from Moyer (1981) and
3062 * Murray (1983), with fundamental arguments adapted from
3063 * Simon et al. 1994. It is an approximation to the expression
3064 * ( v / c ) . ( r / c ), where v is the barycentric velocity of
3065 * the Earth, r is the geocentric position of the observer and
3066 * c is the speed of light.
3067 *
3068 * By supplying zeroes for u and v, the topocentric part of the
3069 * model can be nullified, and the function will return the Fairhead
3070 * & Bretagnon result alone.
3071 *
3072 * <li> During the interval 1950-2050, the absolute accuracy is better
3073 * than +/- 3 nanoseconds relative to time ephemerides obtained by
3074 * direct numerical integrations based on the JPL DE405 solar system
3075 * ephemeris.
3076 *
3077 * <li> It must be stressed that the present function is merely a model,
3078 * and that numerical integration of solar-system ephemerides is the
3079 * definitive method for predicting the relationship between TCG and
3080 * TCB and hence between TT and TDB.
3081 *</ol>
3082 *<p>References:
3083 *
3084 * <p>Fairhead, L., & Bretagnon, P., Astron.Astrophys., 229, 240-247
3085 * (1990).
3086 *
3087 * <p>IAU 2006 Resolution 3.
3088 *
3089 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
3090 * IERS Technical Note No. 32, BKG (2004)
3091 *
3092 * <p>Moyer, T.D., Cel.Mech., 23, 33 (1981).
3093 *
3094 * <p>Murray, C.A., Vectorial Astrometry, Adam Hilger (1983).
3095 *
3096 * <p>Seidelmann, P.K. et al., Explanatory Supplement to the
3097 * Astronomical Almanac, Chapter 2, University Science Books (1992).
3098 *
3099 * <p>Simon, J.L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
3100 * Francou, G. & Laskar, J., Astron.Astrophys., 282, 663-683 (1994).
3101 *
3102 *@version 2009 December 17
3103 *
3104 * @since Release 20101201
3105 *
3106 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
3107 */
3108 public static double jauDtdb(double date1, double date2,
3109 double ut, double elong, double u, double v)
3110 {
3111 double t, tsol, w, elsun, emsun, d, elj, els, wt, w0, w1, w2, w3, w4,
3112 wf, wj;
3113 int j;
3114
3115 /*
3116 * =====================
3117 * Fairhead et al. model
3118 * =====================
3119 *
3120 * 787 sets of three coefficients.
3121 *
3122 * Each set is
3123 * amplitude (microseconds)
3124 * frequency (radians per Julian millennium since J2000.0)
3125 * phase (radians)
3126 *
3127 * Sets 1-474 are the T**0 terms
3128 * " 475-679 " " T**1
3129 * " 680-764 " " T**2
3130 * " 765-784 " " T**3
3131 * " 785-787 " " T**4
3132 */
3133
3134 final double fairhd[][] = {
3135 /* 1, 10 */
3136 { 1656.674564e-6, 6283.075849991, 6.240054195 },
3137 { 22.417471e-6, 5753.384884897, 4.296977442 },
3138 { 13.839792e-6, 12566.151699983, 6.196904410 },
3139 { 4.770086e-6, 529.690965095, 0.444401603 },
3140 { 4.676740e-6, 6069.776754553, 4.021195093 },
3141 { 2.256707e-6, 213.299095438, 5.543113262 },
3142 { 1.694205e-6, -3.523118349, 5.025132748 },
3143 { 1.554905e-6, 77713.771467920, 5.198467090 },
3144 { 1.276839e-6, 7860.419392439, 5.988822341 },
3145 { 1.193379e-6, 5223.693919802, 3.649823730 },
3146 /* 11, 20 */
3147 { 1.115322e-6, 3930.209696220, 1.422745069 },
3148 { 0.794185e-6, 11506.769769794, 2.322313077 },
3149 { 0.447061e-6, 26.298319800, 3.615796498 },
3150 { 0.435206e-6, -398.149003408, 4.349338347 },
3151 { 0.600309e-6, 1577.343542448, 2.678271909 },
3152 { 0.496817e-6, 6208.294251424, 5.696701824 },
3153 { 0.486306e-6, 5884.926846583, 0.520007179 },
3154 { 0.432392e-6, 74.781598567, 2.435898309 },
3155 { 0.468597e-6, 6244.942814354, 5.866398759 },
3156 { 0.375510e-6, 5507.553238667, 4.103476804 },
3157 /* 21, 30 */
3158 { 0.243085e-6, -775.522611324, 3.651837925 },
3159 { 0.173435e-6, 18849.227549974, 6.153743485 },
3160 { 0.230685e-6, 5856.477659115, 4.773852582 },
3161 { 0.203747e-6, 12036.460734888, 4.333987818 },
3162 { 0.143935e-6, -796.298006816, 5.957517795 },
3163 { 0.159080e-6, 10977.078804699, 1.890075226 },
3164 { 0.119979e-6, 38.133035638, 4.551585768 },
3165 { 0.118971e-6, 5486.777843175, 1.914547226 },
3166 { 0.116120e-6, 1059.381930189, 0.873504123 },
3167 { 0.137927e-6, 11790.629088659, 1.135934669 },
3168 /* 31, 40 */
3169 { 0.098358e-6, 2544.314419883, 0.092793886 },
3170 { 0.101868e-6, -5573.142801634, 5.984503847 },
3171 { 0.080164e-6, 206.185548437, 2.095377709 },
3172 { 0.079645e-6, 4694.002954708, 2.949233637 },
3173 { 0.062617e-6, 20.775395492, 2.654394814 },
3174 { 0.075019e-6, 2942.463423292, 4.980931759 },
3175 { 0.064397e-6, 5746.271337896, 1.280308748 },
3176 { 0.063814e-6, 5760.498431898, 4.167901731 },
3177 { 0.048042e-6, 2146.165416475, 1.495846011 },
3178 { 0.048373e-6, 155.420399434, 2.251573730 },
3179 /* 41, 50 */
3180 { 0.058844e-6, 426.598190876, 4.839650148 },
3181 { 0.046551e-6, -0.980321068, 0.921573539 },
3182 { 0.054139e-6, 17260.154654690, 3.411091093 },
3183 { 0.042411e-6, 6275.962302991, 2.869567043 },
3184 { 0.040184e-6, -7.113547001, 3.565975565 },
3185 { 0.036564e-6, 5088.628839767, 3.324679049 },
3186 { 0.040759e-6, 12352.852604545, 3.981496998 },
3187 { 0.036507e-6, 801.820931124, 6.248866009 },
3188 { 0.036955e-6, 3154.687084896, 5.071801441 },
3189 { 0.042732e-6, 632.783739313, 5.720622217 },
3190 /* 51, 60 */
3191 { 0.042560e-6, 161000.685737473, 1.270837679 },
3192 { 0.040480e-6, 15720.838784878, 2.546610123 },
3193 { 0.028244e-6, -6286.598968340, 5.069663519 },
3194 { 0.033477e-6, 6062.663207553, 4.144987272 },
3195 { 0.034867e-6, 522.577418094, 5.210064075 },
3196 { 0.032438e-6, 6076.890301554, 0.749317412 },
3197 { 0.030215e-6, 7084.896781115, 3.389610345 },
3198 { 0.029247e-6, -71430.695617928, 4.183178762 },
3199 { 0.033529e-6, 9437.762934887, 2.404714239 },
3200 { 0.032423e-6, 8827.390269875, 5.541473556 },
3201 /* 61, 70 */
3202 { 0.027567e-6, 6279.552731642, 5.040846034 },
3203 { 0.029862e-6, 12139.553509107, 1.770181024 },
3204 { 0.022509e-6, 10447.387839604, 1.460726241 },
3205 { 0.020937e-6, 8429.241266467, 0.652303414 },
3206 { 0.020322e-6, 419.484643875, 3.735430632 },
3207 { 0.024816e-6, -1194.447010225, 1.087136918 },
3208 { 0.025196e-6, 1748.016413067, 2.901883301 },
3209 { 0.021691e-6, 14143.495242431, 5.952658009 },
3210 { 0.017673e-6, 6812.766815086, 3.186129845 },
3211 { 0.022567e-6, 6133.512652857, 3.307984806 },
3212 /* 71, 80 */
3213 { 0.016155e-6, 10213.285546211, 1.331103168 },
3214 { 0.014751e-6, 1349.867409659, 4.308933301 },
3215 { 0.015949e-6, -220.412642439, 4.005298270 },
3216 { 0.015974e-6, -2352.866153772, 6.145309371 },
3217 { 0.014223e-6, 17789.845619785, 2.104551349 },
3218 { 0.017806e-6, 73.297125859, 3.475975097 },
3219 { 0.013671e-6, -536.804512095, 5.971672571 },
3220 { 0.011942e-6, 8031.092263058, 2.053414715 },
3221 { 0.014318e-6, 16730.463689596, 3.016058075 },
3222 { 0.012462e-6, 103.092774219, 1.737438797 },
3223 /* 81, 90 */
3224 { 0.010962e-6, 3.590428652, 2.196567739 },
3225 { 0.015078e-6, 19651.048481098, 3.969480770 },
3226 { 0.010396e-6, 951.718406251, 5.717799605 },
3227 { 0.011707e-6, -4705.732307544, 2.654125618 },
3228 { 0.010453e-6, 5863.591206116, 1.913704550 },
3229 { 0.012420e-6, 4690.479836359, 4.734090399 },
3230 { 0.011847e-6, 5643.178563677, 5.489005403 },
3231 { 0.008610e-6, 3340.612426700, 3.661698944 },
3232 { 0.011622e-6, 5120.601145584, 4.863931876 },
3233 { 0.010825e-6, 553.569402842, 0.842715011 },
3234 /* 91, 100 */
3235 { 0.008666e-6, -135.065080035, 3.293406547 },
3236 { 0.009963e-6, 149.563197135, 4.870690598 },
3237 { 0.009858e-6, 6309.374169791, 1.061816410 },
3238 { 0.007959e-6, 316.391869657, 2.465042647 },
3239 { 0.010099e-6, 283.859318865, 1.942176992 },
3240 { 0.007147e-6, -242.728603974, 3.661486981 },
3241 { 0.007505e-6, 5230.807466803, 4.920937029 },
3242 { 0.008323e-6, 11769.853693166, 1.229392026 },
3243 { 0.007490e-6, -6256.777530192, 3.658444681 },
3244 { 0.009370e-6, 149854.400134205, 0.673880395 },
3245 /* 101, 110 */
3246 { 0.007117e-6, 38.027672636, 5.294249518 },
3247 { 0.007857e-6, 12168.002696575, 0.525733528 },
3248 { 0.007019e-6, 6206.809778716, 0.837688810 },
3249 { 0.006056e-6, 955.599741609, 4.194535082 },
3250 { 0.008107e-6, 13367.972631107, 3.793235253 },
3251 { 0.006731e-6, 5650.292110678, 5.639906583 },
3252 { 0.007332e-6, 36.648562930, 0.114858677 },
3253 { 0.006366e-6, 4164.311989613, 2.262081818 },
3254 { 0.006858e-6, 5216.580372801, 0.642063318 },
3255 { 0.006919e-6, 6681.224853400, 6.018501522 },
3256 /* 111, 120 */
3257 { 0.006826e-6, 7632.943259650, 3.458654112 },
3258 { 0.005308e-6, -1592.596013633, 2.500382359 },
3259 { 0.005096e-6, 11371.704689758, 2.547107806 },
3260 { 0.004841e-6, 5333.900241022, 0.437078094 },
3261 { 0.005582e-6, 5966.683980335, 2.246174308 },
3262 { 0.006304e-6, 11926.254413669, 2.512929171 },
3263 { 0.006603e-6, 23581.258177318, 5.393136889 },
3264 { 0.005123e-6, -1.484472708, 2.999641028 },
3265 { 0.004648e-6, 1589.072895284, 1.275847090 },
3266 { 0.005119e-6, 6438.496249426, 1.486539246 },
3267 /* 121, 130 */
3268 { 0.004521e-6, 4292.330832950, 6.140635794 },
3269 { 0.005680e-6, 23013.539539587, 4.557814849 },
3270 { 0.005488e-6, -3.455808046, 0.090675389 },
3271 { 0.004193e-6, 7234.794256242, 4.869091389 },
3272 { 0.003742e-6, 7238.675591600, 4.691976180 },
3273 { 0.004148e-6, -110.206321219, 3.016173439 },
3274 { 0.004553e-6, 11499.656222793, 5.554998314 },
3275 { 0.004892e-6, 5436.993015240, 1.475415597 },
3276 { 0.004044e-6, 4732.030627343, 1.398784824 },
3277 { 0.004164e-6, 12491.370101415, 5.650931916 },
3278 /* 131, 140 */
3279 { 0.004349e-6, 11513.883316794, 2.181745369 },
3280 { 0.003919e-6, 12528.018664345, 5.823319737 },
3281 { 0.003129e-6, 6836.645252834, 0.003844094 },
3282 { 0.004080e-6, -7058.598461315, 3.690360123 },
3283 { 0.003270e-6, 76.266071276, 1.517189902 },
3284 { 0.002954e-6, 6283.143160294, 4.447203799 },
3285 { 0.002872e-6, 28.449187468, 1.158692983 },
3286 { 0.002881e-6, 735.876513532, 0.349250250 },
3287 { 0.003279e-6, 5849.364112115, 4.893384368 },
3288 { 0.003625e-6, 6209.778724132, 1.473760578 },
3289 /* 141, 150 */
3290 { 0.003074e-6, 949.175608970, 5.185878737 },
3291 { 0.002775e-6, 9917.696874510, 1.030026325 },
3292 { 0.002646e-6, 10973.555686350, 3.918259169 },
3293 { 0.002575e-6, 25132.303399966, 6.109659023 },
3294 { 0.003500e-6, 263.083923373, 1.892100742 },
3295 { 0.002740e-6, 18319.536584880, 4.320519510 },
3296 { 0.002464e-6, 202.253395174, 4.698203059 },
3297 { 0.002409e-6, 2.542797281, 5.325009315 },
3298 { 0.003354e-6, -90955.551694697, 1.942656623 },
3299 { 0.002296e-6, 6496.374945429, 5.061810696 },
3300 /* 151, 160 */
3301 { 0.003002e-6, 6172.869528772, 2.797822767 },
3302 { 0.003202e-6, 27511.467873537, 0.531673101 },
3303 { 0.002954e-6, -6283.008539689, 4.533471191 },
3304 { 0.002353e-6, 639.897286314, 3.734548088 },
3305 { 0.002401e-6, 16200.772724501, 2.605547070 },
3306 { 0.003053e-6, 233141.314403759, 3.029030662 },
3307 { 0.003024e-6, 83286.914269554, 2.355556099 },
3308 { 0.002863e-6, 17298.182327326, 5.240963796 },
3309 { 0.002103e-6, -7079.373856808, 5.756641637 },
3310 { 0.002303e-6, 83996.847317911, 2.013686814 },
3311 /* 161, 170 */
3312 { 0.002303e-6, 18073.704938650, 1.089100410 },
3313 { 0.002381e-6, 63.735898303, 0.759188178 },
3314 { 0.002493e-6, 6386.168624210, 0.645026535 },
3315 { 0.002366e-6, 3.932153263, 6.215885448 },
3316 { 0.002169e-6, 11015.106477335, 4.845297676 },
3317 { 0.002397e-6, 6243.458341645, 3.809290043 },
3318 { 0.002183e-6, 1162.474704408, 6.179611691 },
3319 { 0.002353e-6, 6246.427287062, 4.781719760 },
3320 { 0.002199e-6, -245.831646229, 5.956152284 },
3321 { 0.001729e-6, 3894.181829542, 1.264976635 },
3322 /* 171, 180 */
3323 { 0.001896e-6, -3128.388765096, 4.914231596 },
3324 { 0.002085e-6, 35.164090221, 1.405158503 },
3325 { 0.002024e-6, 14712.317116458, 2.752035928 },
3326 { 0.001737e-6, 6290.189396992, 5.280820144 },
3327 { 0.002229e-6, 491.557929457, 1.571007057 },
3328 { 0.001602e-6, 14314.168113050, 4.203664806 },
3329 { 0.002186e-6, 454.909366527, 1.402101526 },
3330 { 0.001897e-6, 22483.848574493, 4.167932508 },
3331 { 0.001825e-6, -3738.761430108, 0.545828785 },
3332 { 0.001894e-6, 1052.268383188, 5.817167450 },
3333 /* 181, 190 */
3334 { 0.001421e-6, 20.355319399, 2.419886601 },
3335 { 0.001408e-6, 10984.192351700, 2.732084787 },
3336 { 0.001847e-6, 10873.986030480, 2.903477885 },
3337 { 0.001391e-6, -8635.942003763, 0.593891500 },
3338 { 0.001388e-6, -7.046236698, 1.166145902 },
3339 { 0.001810e-6, -88860.057071188, 0.487355242 },
3340 { 0.001288e-6, -1990.745017041, 3.913022880 },
3341 { 0.001297e-6, 23543.230504682, 3.063805171 },
3342 { 0.001335e-6, -266.607041722, 3.995764039 },
3343 { 0.001376e-6, 10969.965257698, 5.152914309 },
3344 /* 191, 200 */
3345 { 0.001745e-6, 244287.600007027, 3.626395673 },
3346 { 0.001649e-6, 31441.677569757, 1.952049260 },
3347 { 0.001416e-6, 9225.539273283, 4.996408389 },
3348 { 0.001238e-6, 4804.209275927, 5.503379738 },
3349 { 0.001472e-6, 4590.910180489, 4.164913291 },
3350 { 0.001169e-6, 6040.347246017, 5.841719038 },
3351 { 0.001039e-6, 5540.085789459, 2.769753519 },
3352 { 0.001004e-6, -170.672870619, 0.755008103 },
3353 { 0.001284e-6, 10575.406682942, 5.306538209 },
3354 { 0.001278e-6, 71.812653151, 4.713486491 },
3355 /* 201, 210 */
3356 { 0.001321e-6, 18209.330263660, 2.624866359 },
3357 { 0.001297e-6, 21228.392023546, 0.382603541 },
3358 { 0.000954e-6, 6282.095528923, 0.882213514 },
3359 { 0.001145e-6, 6058.731054289, 1.169483931 },
3360 { 0.000979e-6, 5547.199336460, 5.448375984 },
3361 { 0.000987e-6, -6262.300454499, 2.656486959 },
3362 { 0.001070e-6, -154717.609887482, 1.827624012 },
3363 { 0.000991e-6, 4701.116501708, 4.387001801 },
3364 { 0.001155e-6, -14.227094002, 3.042700750 },
3365 { 0.001176e-6, 277.034993741, 3.335519004 },
3366 /* 211, 220 */
3367 { 0.000890e-6, 13916.019109642, 5.601498297 },
3368 { 0.000884e-6, -1551.045222648, 1.088831705 },
3369 { 0.000876e-6, 5017.508371365, 3.969902609 },
3370 { 0.000806e-6, 15110.466119866, 5.142876744 },
3371 { 0.000773e-6, -4136.910433516, 0.022067765 },
3372 { 0.001077e-6, 175.166059800, 1.844913056 },
3373 { 0.000954e-6, -6284.056171060, 0.968480906 },
3374 { 0.000737e-6, 5326.786694021, 4.923831588 },
3375 { 0.000845e-6, -433.711737877, 4.749245231 },
3376 { 0.000819e-6, 8662.240323563, 5.991247817 },
3377 /* 221, 230 */
3378 { 0.000852e-6, 199.072001436, 2.189604979 },
3379 { 0.000723e-6, 17256.631536341, 6.068719637 },
3380 { 0.000940e-6, 6037.244203762, 6.197428148 },
3381 { 0.000885e-6, 11712.955318231, 3.280414875 },
3382 { 0.000706e-6, 12559.038152982, 2.824848947 },
3383 { 0.000732e-6, 2379.164473572, 2.501813417 },
3384 { 0.000764e-6, -6127.655450557, 2.236346329 },
3385 { 0.000908e-6, 131.541961686, 2.521257490 },
3386 { 0.000907e-6, 35371.887265976, 3.370195967 },
3387 { 0.000673e-6, 1066.495477190, 3.876512374 },
3388 /* 231, 240 */
3389 { 0.000814e-6, 17654.780539750, 4.627122566 },
3390 { 0.000630e-6, 36.027866677, 0.156368499 },
3391 { 0.000798e-6, 515.463871093, 5.151962502 },
3392 { 0.000798e-6, 148.078724426, 5.909225055 },
3393 { 0.000806e-6, 309.278322656, 6.054064447 },
3394 { 0.000607e-6, -39.617508346, 2.839021623 },
3395 { 0.000601e-6, 412.371096874, 3.984225404 },
3396 { 0.000646e-6, 11403.676995575, 3.852959484 },
3397 { 0.000704e-6, 13521.751441591, 2.300991267 },
3398 { 0.000603e-6, -65147.619767937, 4.140083146 },
3399 /* 241, 250 */
3400 { 0.000609e-6, 10177.257679534, 0.437122327 },
3401 { 0.000631e-6, 5767.611978898, 4.026532329 },
3402 { 0.000576e-6, 11087.285125918, 4.760293101 },
3403 { 0.000674e-6, 14945.316173554, 6.270510511 },
3404 { 0.000726e-6, 5429.879468239, 6.039606892 },
3405 { 0.000710e-6, 28766.924424484, 5.672617711 },
3406 { 0.000647e-6, 11856.218651625, 3.397132627 },
3407 { 0.000678e-6, -5481.254918868, 6.249666675 },
3408 { 0.000618e-6, 22003.914634870, 2.466427018 },
3409 { 0.000738e-6, 6134.997125565, 2.242668890 },
3410 /* 251, 260 */
3411 { 0.000660e-6, 625.670192312, 5.864091907 },
3412 { 0.000694e-6, 3496.032826134, 2.668309141 },
3413 { 0.000531e-6, 6489.261398429, 1.681888780 },
3414 { 0.000611e-6, -143571.324284214, 2.424978312 },
3415 { 0.000575e-6, 12043.574281889, 4.216492400 },
3416 { 0.000553e-6, 12416.588502848, 4.772158039 },
3417 { 0.000689e-6, 4686.889407707, 6.224271088 },
3418 { 0.000495e-6, 7342.457780181, 3.817285811 },
3419 { 0.000567e-6, 3634.621024518, 1.649264690 },
3420 { 0.000515e-6, 18635.928454536, 3.945345892 },
3421 /* 261, 270 */
3422 { 0.000486e-6, -323.505416657, 4.061673868 },
3423 { 0.000662e-6, 25158.601719765, 1.794058369 },
3424 { 0.000509e-6, 846.082834751, 3.053874588 },
3425 { 0.000472e-6, -12569.674818332, 5.112133338 },
3426 { 0.000461e-6, 6179.983075773, 0.513669325 },
3427 { 0.000641e-6, 83467.156352816, 3.210727723 },
3428 { 0.000520e-6, 10344.295065386, 2.445597761 },
3429 { 0.000493e-6, 18422.629359098, 1.676939306 },
3430 { 0.000478e-6, 1265.567478626, 5.487314569 },
3431 { 0.000472e-6, -18.159247265, 1.999707589 },
3432 /* 271, 280 */
3433 { 0.000559e-6, 11190.377900137, 5.783236356 },
3434 { 0.000494e-6, 9623.688276691, 3.022645053 },
3435 { 0.000463e-6, 5739.157790895, 1.411223013 },
3436 { 0.000432e-6, 16858.482532933, 1.179256434 },
3437 { 0.000574e-6, 72140.628666286, 1.758191830 },
3438 { 0.000484e-6, 17267.268201691, 3.290589143 },
3439 { 0.000550e-6, 4907.302050146, 0.864024298 },
3440 { 0.000399e-6, 14.977853527, 2.094441910 },
3441 { 0.000491e-6, 224.344795702, 0.878372791 },
3442 { 0.000432e-6, 20426.571092422, 6.003829241 },
3443 /* 281, 290 */
3444 { 0.000481e-6, 5749.452731634, 4.309591964 },
3445 { 0.000480e-6, 5757.317038160, 1.142348571 },
3446 { 0.000485e-6, 6702.560493867, 0.210580917 },
3447 { 0.000426e-6, 6055.549660552, 4.274476529 },
3448 { 0.000480e-6, 5959.570433334, 5.031351030 },
3449 { 0.000466e-6, 12562.628581634, 4.959581597 },
3450 { 0.000520e-6, 39302.096962196, 4.788002889 },
3451 { 0.000458e-6, 12132.439962106, 1.880103788 },
3452 { 0.000470e-6, 12029.347187887, 1.405611197 },
3453 { 0.000416e-6, -7477.522860216, 1.082356330 },
3454 /* 291, 300 */
3455 { 0.000449e-6, 11609.862544012, 4.179989585 },
3456 { 0.000465e-6, 17253.041107690, 0.353496295 },
3457 { 0.000362e-6, -4535.059436924, 1.583849576 },
3458 { 0.000383e-6, 21954.157609398, 3.747376371 },
3459 { 0.000389e-6, 17.252277143, 1.395753179 },
3460 { 0.000331e-6, 18052.929543158, 0.566790582 },
3461 { 0.000430e-6, 13517.870106233, 0.685827538 },
3462 { 0.000368e-6, -5756.908003246, 0.731374317 },
3463 { 0.000330e-6, 10557.594160824, 3.710043680 },
3464 { 0.000332e-6, 20199.094959633, 1.652901407 },
3465 /* 301, 310 */
3466 { 0.000384e-6, 11933.367960670, 5.827781531 },
3467 { 0.000387e-6, 10454.501386605, 2.541182564 },
3468 { 0.000325e-6, 15671.081759407, 2.178850542 },
3469 { 0.000318e-6, 138.517496871, 2.253253037 },
3470 { 0.000305e-6, 9388.005909415, 0.578340206 },
3471 { 0.000352e-6, 5749.861766548, 3.000297967 },
3472 { 0.000311e-6, 6915.859589305, 1.693574249 },
3473 { 0.000297e-6, 24072.921469776, 1.997249392 },
3474 { 0.000363e-6, -640.877607382, 5.071820966 },
3475 { 0.000323e-6, 12592.450019783, 1.072262823 },
3476 /* 311, 320 */
3477 { 0.000341e-6, 12146.667056108, 4.700657997 },
3478 { 0.000290e-6, 9779.108676125, 1.812320441 },
3479 { 0.000342e-6, 6132.028180148, 4.322238614 },
3480 { 0.000329e-6, 6268.848755990, 3.033827743 },
3481 { 0.000374e-6, 17996.031168222, 3.388716544 },
3482 { 0.000285e-6, -533.214083444, 4.687313233 },
3483 { 0.000338e-6, 6065.844601290, 0.877776108 },
3484 { 0.000276e-6, 24.298513841, 0.770299429 },
3485 { 0.000336e-6, -2388.894020449, 5.353796034 },
3486 { 0.000290e-6, 3097.883822726, 4.075291557 },
3487 /* 321, 330 */
3488 { 0.000318e-6, 709.933048357, 5.941207518 },
3489 { 0.000271e-6, 13095.842665077, 3.208912203 },
3490 { 0.000331e-6, 6073.708907816, 4.007881169 },
3491 { 0.000292e-6, 742.990060533, 2.714333592 },
3492 { 0.000362e-6, 29088.811415985, 3.215977013 },
3493 { 0.000280e-6, 12359.966151546, 0.710872502 },
3494 { 0.000267e-6, 10440.274292604, 4.730108488 },
3495 { 0.000262e-6, 838.969287750, 1.327720272 },
3496 { 0.000250e-6, 16496.361396202, 0.898769761 },
3497 { 0.000325e-6, 20597.243963041, 0.180044365 },
3498 /* 331, 340 */
3499 { 0.000268e-6, 6148.010769956, 5.152666276 },
3500 { 0.000284e-6, 5636.065016677, 5.655385808 },
3501 { 0.000301e-6, 6080.822454817, 2.135396205 },
3502 { 0.000294e-6, -377.373607916, 3.708784168 },
3503 { 0.000236e-6, 2118.763860378, 1.733578756 },
3504 { 0.000234e-6, 5867.523359379, 5.575209112 },
3505 { 0.000268e-6, -226858.238553767, 0.069432392 },
3506 { 0.000265e-6, 167283.761587465, 4.369302826 },
3507 { 0.000280e-6, 28237.233459389, 5.304829118 },
3508 { 0.000292e-6, 12345.739057544, 4.096094132 },
3509 /* 341, 350 */
3510 { 0.000223e-6, 19800.945956225, 3.069327406 },
3511 { 0.000301e-6, 43232.306658416, 6.205311188 },
3512 { 0.000264e-6, 18875.525869774, 1.417263408 },
3513 { 0.000304e-6, -1823.175188677, 3.409035232 },
3514 { 0.000301e-6, 109.945688789, 0.510922054 },
3515 { 0.000260e-6, 813.550283960, 2.389438934 },
3516 { 0.000299e-6, 316428.228673312, 5.384595078 },
3517 { 0.000211e-6, 5756.566278634, 3.789392838 },
3518 { 0.000209e-6, 5750.203491159, 1.661943545 },
3519 { 0.000240e-6, 12489.885628707, 5.684549045 },
3520 /* 351, 360 */
3521 { 0.000216e-6, 6303.851245484, 3.862942261 },
3522 { 0.000203e-6, 1581.959348283, 5.549853589 },
3523 { 0.000200e-6, 5642.198242609, 1.016115785 },
3524 { 0.000197e-6, -70.849445304, 4.690702525 },
3525 { 0.000227e-6, 6287.008003254, 2.911891613 },
3526 { 0.000197e-6, 533.623118358, 1.048982898 },
3527 { 0.000205e-6, -6279.485421340, 1.829362730 },
3528 { 0.000209e-6, -10988.808157535, 2.636140084 },
3529 { 0.000208e-6, -227.526189440, 4.127883842 },
3530 { 0.000191e-6, 415.552490612, 4.401165650 },
3531 /* 361, 370 */
3532 { 0.000190e-6, 29296.615389579, 4.175658539 },
3533 { 0.000264e-6, 66567.485864652, 4.601102551 },
3534 { 0.000256e-6, -3646.350377354, 0.506364778 },
3535 { 0.000188e-6, 13119.721102825, 2.032195842 },
3536 { 0.000185e-6, -209.366942175, 4.694756586 },
3537 { 0.000198e-6, 25934.124331089, 3.832703118 },
3538 { 0.000195e-6, 4061.219215394, 3.308463427 },
3539 { 0.000234e-6, 5113.487598583, 1.716090661 },
3540 { 0.000188e-6, 1478.866574064, 5.686865780 },
3541 { 0.000222e-6, 11823.161639450, 1.942386641 },
3542 /* 371, 380 */
3543 { 0.000181e-6, 10770.893256262, 1.999482059 },
3544 { 0.000171e-6, 6546.159773364, 1.182807992 },
3545 { 0.000206e-6, 70.328180442, 5.934076062 },
3546 { 0.000169e-6, 20995.392966449, 2.169080622 },
3547 { 0.000191e-6, 10660.686935042, 5.405515999 },
3548 { 0.000228e-6, 33019.021112205, 4.656985514 },
3549 { 0.000184e-6, -4933.208440333, 3.327476868 },
3550 { 0.000220e-6, -135.625325010, 1.765430262 },
3551 { 0.000166e-6, 23141.558382925, 3.454132746 },
3552 { 0.000191e-6, 6144.558353121, 5.020393445 },
3553 /* 381, 390 */
3554 { 0.000180e-6, 6084.003848555, 0.602182191 },
3555 { 0.000163e-6, 17782.732072784, 4.960593133 },
3556 { 0.000225e-6, 16460.333529525, 2.596451817 },
3557 { 0.000222e-6, 5905.702242076, 3.731990323 },
3558 { 0.000204e-6, 227.476132789, 5.636192701 },
3559 { 0.000159e-6, 16737.577236597, 3.600691544 },
3560 { 0.000200e-6, 6805.653268085, 0.868220961 },
3561 { 0.000187e-6, 11919.140866668, 2.629456641 },
3562 { 0.000161e-6, 127.471796607, 2.862574720 },
3563 { 0.000205e-6, 6286.666278643, 1.742882331 },
3564 /* 391, 400 */
3565 { 0.000189e-6, 153.778810485, 4.812372643 },
3566 { 0.000168e-6, 16723.350142595, 0.027860588 },
3567 { 0.000149e-6, 11720.068865232, 0.659721876 },
3568 { 0.000189e-6, 5237.921013804, 5.245313000 },
3569 { 0.000143e-6, 6709.674040867, 4.317625647 },
3570 { 0.000146e-6, 4487.817406270, 4.815297007 },
3571 { 0.000144e-6, -664.756045130, 5.381366880 },
3572 { 0.000175e-6, 5127.714692584, 4.728443327 },
3573 { 0.000162e-6, 6254.626662524, 1.435132069 },
3574 { 0.000187e-6, 47162.516354635, 1.354371923 },
3575 /* 401, 410 */
3576 { 0.000146e-6, 11080.171578918, 3.369695406 },
3577 { 0.000180e-6, -348.924420448, 2.490902145 },
3578 { 0.000148e-6, 151.047669843, 3.799109588 },
3579 { 0.000157e-6, 6197.248551160, 1.284375887 },
3580 { 0.000167e-6, 146.594251718, 0.759969109 },
3581 { 0.000133e-6, -5331.357443741, 5.409701889 },
3582 { 0.000154e-6, 95.979227218, 3.366890614 },
3583 { 0.000148e-6, -6418.140930027, 3.384104996 },
3584 { 0.000128e-6, -6525.804453965, 3.803419985 },
3585 { 0.000130e-6, 11293.470674356, 0.939039445 },
3586 /* 411, 420 */
3587 { 0.000152e-6, -5729.506447149, 0.734117523 },
3588 { 0.000138e-6, 210.117701700, 2.564216078 },
3589 { 0.000123e-6, 6066.595360816, 4.517099537 },
3590 { 0.000140e-6, 18451.078546566, 0.642049130 },
3591 { 0.000126e-6, 11300.584221356, 3.485280663 },
3592 { 0.000119e-6, 10027.903195729, 3.217431161 },
3593 { 0.000151e-6, 4274.518310832, 4.404359108 },
3594 { 0.000117e-6, 6072.958148291, 0.366324650 },
3595 { 0.000165e-6, -7668.637425143, 4.298212528 },
3596 { 0.000117e-6, -6245.048177356, 5.379518958 },
3597 /* 421, 430 */
3598 { 0.000130e-6, -5888.449964932, 4.527681115 },
3599 { 0.000121e-6, -543.918059096, 6.109429504 },
3600 { 0.000162e-6, 9683.594581116, 5.720092446 },
3601 { 0.000141e-6, 6219.339951688, 0.679068671 },
3602 { 0.000118e-6, 22743.409379516, 4.881123092 },
3603 { 0.000129e-6, 1692.165669502, 0.351407289 },
3604 { 0.000126e-6, 5657.405657679, 5.146592349 },
3605 { 0.000114e-6, 728.762966531, 0.520791814 },
3606 { 0.000120e-6, 52.596639600, 0.948516300 },
3607 { 0.000115e-6, 65.220371012, 3.504914846 },
3608 /* 431, 440 */
3609 { 0.000126e-6, 5881.403728234, 5.577502482 },
3610 { 0.000158e-6, 163096.180360983, 2.957128968 },
3611 { 0.000134e-6, 12341.806904281, 2.598576764 },
3612 { 0.000151e-6, 16627.370915377, 3.985702050 },
3613 { 0.000109e-6, 1368.660252845, 0.014730471 },
3614 { 0.000131e-6, 6211.263196841, 0.085077024 },
3615 { 0.000146e-6, 5792.741760812, 0.708426604 },
3616 { 0.000146e-6, -77.750543984, 3.121576600 },
3617 { 0.000107e-6, 5341.013788022, 0.288231904 },
3618 { 0.000138e-6, 6281.591377283, 2.797450317 },
3619 /* 441, 450 */
3620 { 0.000113e-6, -6277.552925684, 2.788904128 },
3621 { 0.000115e-6, -525.758811831, 5.895222200 },
3622 { 0.000138e-6, 6016.468808270, 6.096188999 },
3623 { 0.000139e-6, 23539.707386333, 2.028195445 },
3624 { 0.000146e-6, -4176.041342449, 4.660008502 },
3625 { 0.000107e-6, 16062.184526117, 4.066520001 },
3626 { 0.000142e-6, 83783.548222473, 2.936315115 },
3627 { 0.000128e-6, 9380.959672717, 3.223844306 },
3628 { 0.000135e-6, 6205.325306007, 1.638054048 },
3629 { 0.000101e-6, 2699.734819318, 5.481603249 },
3630 /* 451, 460 */
3631 { 0.000104e-6, -568.821874027, 2.205734493 },
3632 { 0.000103e-6, 6321.103522627, 2.440421099 },
3633 { 0.000119e-6, 6321.208885629, 2.547496264 },
3634 { 0.000138e-6, 1975.492545856, 2.314608466 },
3635 { 0.000121e-6, 137.033024162, 4.539108237 },
3636 { 0.000123e-6, 19402.796952817, 4.538074405 },
3637 { 0.000119e-6, 22805.735565994, 2.869040566 },
3638 { 0.000133e-6, 64471.991241142, 6.056405489 },
3639 { 0.000129e-6, -85.827298831, 2.540635083 },
3640 { 0.000131e-6, 13613.804277336, 4.005732868 },
3641 /* 461, 470 */
3642 { 0.000104e-6, 9814.604100291, 1.959967212 },
3643 { 0.000112e-6, 16097.679950283, 3.589026260 },
3644 { 0.000123e-6, 2107.034507542, 1.728627253 },
3645 { 0.000121e-6, 36949.230808424, 6.072332087 },
3646 { 0.000108e-6, -12539.853380183, 3.716133846 },
3647 { 0.000113e-6, -7875.671863624, 2.725771122 },
3648 { 0.000109e-6, 4171.425536614, 4.033338079 },
3649 { 0.000101e-6, 6247.911759770, 3.441347021 },
3650 { 0.000113e-6, 7330.728427345, 0.656372122 },
3651 { 0.000113e-6, 51092.726050855, 2.791483066 },
3652 /* 471, 480 */
3653 { 0.000106e-6, 5621.842923210, 1.815323326 },
3654 { 0.000101e-6, 111.430161497, 5.711033677 },
3655 { 0.000103e-6, 909.818733055, 2.812745443 },
3656 { 0.000101e-6, 1790.642637886, 1.965746028 },
3657
3658 /* T */
3659 { 102.156724e-6, 6283.075849991, 4.249032005 },
3660 { 1.706807e-6, 12566.151699983, 4.205904248 },
3661 { 0.269668e-6, 213.299095438, 3.400290479 },
3662 { 0.265919e-6, 529.690965095, 5.836047367 },
3663 { 0.210568e-6, -3.523118349, 6.262738348 },
3664 { 0.077996e-6, 5223.693919802, 4.670344204 },
3665 /* 481, 490 */
3666 { 0.054764e-6, 1577.343542448, 4.534800170 },
3667 { 0.059146e-6, 26.298319800, 1.083044735 },
3668 { 0.034420e-6, -398.149003408, 5.980077351 },
3669 { 0.032088e-6, 18849.227549974, 4.162913471 },
3670 { 0.033595e-6, 5507.553238667, 5.980162321 },
3671 { 0.029198e-6, 5856.477659115, 0.623811863 },
3672 { 0.027764e-6, 155.420399434, 3.745318113 },
3673 { 0.025190e-6, 5746.271337896, 2.980330535 },
3674 { 0.022997e-6, -796.298006816, 1.174411803 },
3675 { 0.024976e-6, 5760.498431898, 2.467913690 },
3676 /* 491, 500 */
3677 { 0.021774e-6, 206.185548437, 3.854787540 },
3678 { 0.017925e-6, -775.522611324, 1.092065955 },
3679 { 0.013794e-6, 426.598190876, 2.699831988 },
3680 { 0.013276e-6, 6062.663207553, 5.845801920 },
3681 { 0.011774e-6, 12036.460734888, 2.292832062 },
3682 { 0.012869e-6, 6076.890301554, 5.333425680 },
3683 { 0.012152e-6, 1059.381930189, 6.222874454 },
3684 { 0.011081e-6, -7.113547001, 5.154724984 },
3685 { 0.010143e-6, 4694.002954708, 4.044013795 },
3686 { 0.009357e-6, 5486.777843175, 3.416081409 },
3687 /* 501, 510 */
3688 { 0.010084e-6, 522.577418094, 0.749320262 },
3689 { 0.008587e-6, 10977.078804699, 2.777152598 },
3690 { 0.008628e-6, 6275.962302991, 4.562060226 },
3691 { 0.008158e-6, -220.412642439, 5.806891533 },
3692 { 0.007746e-6, 2544.314419883, 1.603197066 },
3693 { 0.007670e-6, 2146.165416475, 3.000200440 },
3694 { 0.007098e-6, 74.781598567, 0.443725817 },
3695 { 0.006180e-6, -536.804512095, 1.302642751 },
3696 { 0.005818e-6, 5088.628839767, 4.827723531 },
3697 { 0.004945e-6, -6286.598968340, 0.268305170 },
3698 /* 511, 520 */
3699 { 0.004774e-6, 1349.867409659, 5.808636673 },
3700 { 0.004687e-6, -242.728603974, 5.154890570 },
3701 { 0.006089e-6, 1748.016413067, 4.403765209 },
3702 { 0.005975e-6, -1194.447010225, 2.583472591 },
3703 { 0.004229e-6, 951.718406251, 0.931172179 },
3704 { 0.005264e-6, 553.569402842, 2.336107252 },
3705 { 0.003049e-6, 5643.178563677, 1.362634430 },
3706 { 0.002974e-6, 6812.766815086, 1.583012668 },
3707 { 0.003403e-6, -2352.866153772, 2.552189886 },
3708 { 0.003030e-6, 419.484643875, 5.286473844 },
3709 /* 521, 530 */
3710 { 0.003210e-6, -7.046236698, 1.863796539 },
3711 { 0.003058e-6, 9437.762934887, 4.226420633 },
3712 { 0.002589e-6, 12352.852604545, 1.991935820 },
3713 { 0.002927e-6, 5216.580372801, 2.319951253 },
3714 { 0.002425e-6, 5230.807466803, 3.084752833 },
3715 { 0.002656e-6, 3154.687084896, 2.487447866 },
3716 { 0.002445e-6, 10447.387839604, 2.347139160 },
3717 { 0.002990e-6, 4690.479836359, 6.235872050 },
3718 { 0.002890e-6, 5863.591206116, 0.095197563 },
3719 { 0.002498e-6, 6438.496249426, 2.994779800 },
3720 /* 531, 540 */
3721 { 0.001889e-6, 8031.092263058, 3.569003717 },
3722 { 0.002567e-6, 801.820931124, 3.425611498 },
3723 { 0.001803e-6, -71430.695617928, 2.192295512 },
3724 { 0.001782e-6, 3.932153263, 5.180433689 },
3725 { 0.001694e-6, -4705.732307544, 4.641779174 },
3726 { 0.001704e-6, -1592.596013633, 3.997097652 },
3727 { 0.001735e-6, 5849.364112115, 0.417558428 },
3728 { 0.001643e-6, 8429.241266467, 2.180619584 },
3729 { 0.001680e-6, 38.133035638, 4.164529426 },
3730 { 0.002045e-6, 7084.896781115, 0.526323854 },
3731 /* 541, 550 */
3732 { 0.001458e-6, 4292.330832950, 1.356098141 },
3733 { 0.001437e-6, 20.355319399, 3.895439360 },
3734 { 0.001738e-6, 6279.552731642, 0.087484036 },
3735 { 0.001367e-6, 14143.495242431, 3.987576591 },
3736 { 0.001344e-6, 7234.794256242, 0.090454338 },
3737 { 0.001438e-6, 11499.656222793, 0.974387904 },
3738 { 0.001257e-6, 6836.645252834, 1.509069366 },
3739 { 0.001358e-6, 11513.883316794, 0.495572260 },
3740 { 0.001628e-6, 7632.943259650, 4.968445721 },
3741 { 0.001169e-6, 103.092774219, 2.838496795 },
3742 /* 551, 560 */
3743 { 0.001162e-6, 4164.311989613, 3.408387778 },
3744 { 0.001092e-6, 6069.776754553, 3.617942651 },
3745 { 0.001008e-6, 17789.845619785, 0.286350174 },
3746 { 0.001008e-6, 639.897286314, 1.610762073 },
3747 { 0.000918e-6, 10213.285546211, 5.532798067 },
3748 { 0.001011e-6, -6256.777530192, 0.661826484 },
3749 { 0.000753e-6, 16730.463689596, 3.905030235 },
3750 { 0.000737e-6, 11926.254413669, 4.641956361 },
3751 { 0.000694e-6, 3340.612426700, 2.111120332 },
3752 { 0.000701e-6, 3894.181829542, 2.760823491 },
3753 /* 561, 570 */
3754 { 0.000689e-6, -135.065080035, 4.768800780 },
3755 { 0.000700e-6, 13367.972631107, 5.760439898 },
3756 { 0.000664e-6, 6040.347246017, 1.051215840 },
3757 { 0.000654e-6, 5650.292110678, 4.911332503 },
3758 { 0.000788e-6, 6681.224853400, 4.699648011 },
3759 { 0.000628e-6, 5333.900241022, 5.024608847 },
3760 { 0.000755e-6, -110.206321219, 4.370971253 },
3761 { 0.000628e-6, 6290.189396992, 3.660478857 },
3762 { 0.000635e-6, 25132.303399966, 4.121051532 },
3763 { 0.000534e-6, 5966.683980335, 1.173284524 },
3764 /* 571, 580 */
3765 { 0.000543e-6, -433.711737877, 0.345585464 },
3766 { 0.000517e-6, -1990.745017041, 5.414571768 },
3767 { 0.000504e-6, 5767.611978898, 2.328281115 },
3768 { 0.000485e-6, 5753.384884897, 1.685874771 },
3769 { 0.000463e-6, 7860.419392439, 5.297703006 },
3770 { 0.000604e-6, 515.463871093, 0.591998446 },
3771 { 0.000443e-6, 12168.002696575, 4.830881244 },
3772 { 0.000570e-6, 199.072001436, 3.899190272 },
3773 { 0.000465e-6, 10969.965257698, 0.476681802 },
3774 { 0.000424e-6, -7079.373856808, 1.112242763 },
3775 /* 581, 590 */
3776 { 0.000427e-6, 735.876513532, 1.994214480 },
3777 { 0.000478e-6, -6127.655450557, 3.778025483 },
3778 { 0.000414e-6, 10973.555686350, 5.441088327 },
3779 { 0.000512e-6, 1589.072895284, 0.107123853 },
3780 { 0.000378e-6, 10984.192351700, 0.915087231 },
3781 { 0.000402e-6, 11371.704689758, 4.107281715 },
3782 { 0.000453e-6, 9917.696874510, 1.917490952 },
3783 { 0.000395e-6, 149.563197135, 2.763124165 },
3784 { 0.000371e-6, 5739.157790895, 3.112111866 },
3785 { 0.000350e-6, 11790.629088659, 0.440639857 },
3786 /* 591, 600 */
3787 { 0.000356e-6, 6133.512652857, 5.444568842 },
3788 { 0.000344e-6, 412.371096874, 5.676832684 },
3789 { 0.000383e-6, 955.599741609, 5.559734846 },
3790 { 0.000333e-6, 6496.374945429, 0.261537984 },
3791 { 0.000340e-6, 6055.549660552, 5.975534987 },
3792 { 0.000334e-6, 1066.495477190, 2.335063907 },
3793 { 0.000399e-6, 11506.769769794, 5.321230910 },
3794 { 0.000314e-6, 18319.536584880, 2.313312404 },
3795 { 0.000424e-6, 1052.268383188, 1.211961766 },
3796 { 0.000307e-6, 63.735898303, 3.169551388 },
3797 /* 601, 610 */
3798 { 0.000329e-6, 29.821438149, 6.106912080 },
3799 { 0.000357e-6, 6309.374169791, 4.223760346 },
3800 { 0.000312e-6, -3738.761430108, 2.180556645 },
3801 { 0.000301e-6, 309.278322656, 1.499984572 },
3802 { 0.000268e-6, 12043.574281889, 2.447520648 },
3803 { 0.000257e-6, 12491.370101415, 3.662331761 },
3804 { 0.000290e-6, 625.670192312, 1.272834584 },
3805 { 0.000256e-6, 5429.879468239, 1.913426912 },
3806 { 0.000339e-6, 3496.032826134, 4.165930011 },
3807 { 0.000283e-6, 3930.209696220, 4.325565754 },
3808 /* 611, 620 */
3809 { 0.000241e-6, 12528.018664345, 3.832324536 },
3810 { 0.000304e-6, 4686.889407707, 1.612348468 },
3811 { 0.000259e-6, 16200.772724501, 3.470173146 },
3812 { 0.000238e-6, 12139.553509107, 1.147977842 },
3813 { 0.000236e-6, 6172.869528772, 3.776271728 },
3814 { 0.000296e-6, -7058.598461315, 0.460368852 },
3815 { 0.000306e-6, 10575.406682942, 0.554749016 },
3816 { 0.000251e-6, 17298.182327326, 0.834332510 },
3817 { 0.000290e-6, 4732.030627343, 4.759564091 },
3818 { 0.000261e-6, 5884.926846583, 0.298259862 },
3819 /* 621, 630 */
3820 { 0.000249e-6, 5547.199336460, 3.749366406 },
3821 { 0.000213e-6, 11712.955318231, 5.415666119 },
3822 { 0.000223e-6, 4701.116501708, 2.703203558 },
3823 { 0.000268e-6, -640.877607382, 0.283670793 },
3824 { 0.000209e-6, 5636.065016677, 1.238477199 },
3825 { 0.000193e-6, 10177.257679534, 1.943251340 },
3826 { 0.000182e-6, 6283.143160294, 2.456157599 },
3827 { 0.000184e-6, -227.526189440, 5.888038582 },
3828 { 0.000182e-6, -6283.008539689, 0.241332086 },
3829 { 0.000228e-6, -6284.056171060, 2.657323816 },
3830 /* 631, 640 */
3831 { 0.000166e-6, 7238.675591600, 5.930629110 },
3832 { 0.000167e-6, 3097.883822726, 5.570955333 },
3833 { 0.000159e-6, -323.505416657, 5.786670700 },
3834 { 0.000154e-6, -4136.910433516, 1.517805532 },
3835 { 0.000176e-6, 12029.347187887, 3.139266834 },
3836 { 0.000167e-6, 12132.439962106, 3.556352289 },
3837 { 0.000153e-6, 202.253395174, 1.463313961 },
3838 { 0.000157e-6, 17267.268201691, 1.586837396 },
3839 { 0.000142e-6, 83996.847317911, 0.022670115 },
3840 { 0.000152e-6, 17260.154654690, 0.708528947 },
3841 /* 641, 650 */
3842 { 0.000144e-6, 6084.003848555, 5.187075177 },
3843 { 0.000135e-6, 5756.566278634, 1.993229262 },
3844 { 0.000134e-6, 5750.203491159, 3.457197134 },
3845 { 0.000144e-6, 5326.786694021, 6.066193291 },
3846 { 0.000160e-6, 11015.106477335, 1.710431974 },
3847 { 0.000133e-6, 3634.621024518, 2.836451652 },
3848 { 0.000134e-6, 18073.704938650, 5.453106665 },
3849 { 0.000134e-6, 1162.474704408, 5.326898811 },
3850 { 0.000128e-6, 5642.198242609, 2.511652591 },
3851 { 0.000160e-6, 632.783739313, 5.628785365 },
3852 /* 651, 660 */
3853 { 0.000132e-6, 13916.019109642, 0.819294053 },
3854 { 0.000122e-6, 14314.168113050, 5.677408071 },
3855 { 0.000125e-6, 12359.966151546, 5.251984735 },
3856 { 0.000121e-6, 5749.452731634, 2.210924603 },
3857 { 0.000136e-6, -245.831646229, 1.646502367 },
3858 { 0.000120e-6, 5757.317038160, 3.240883049 },
3859 { 0.000134e-6, 12146.667056108, 3.059480037 },
3860 { 0.000137e-6, 6206.809778716, 1.867105418 },
3861 { 0.000141e-6, 17253.041107690, 2.069217456 },
3862 { 0.000129e-6, -7477.522860216, 2.781469314 },
3863 /* 661, 670 */
3864 { 0.000116e-6, 5540.085789459, 4.281176991 },
3865 { 0.000116e-6, 9779.108676125, 3.320925381 },
3866 { 0.000129e-6, 5237.921013804, 3.497704076 },
3867 { 0.000113e-6, 5959.570433334, 0.983210840 },
3868 { 0.000122e-6, 6282.095528923, 2.674938860 },
3869 { 0.000140e-6, -11.045700264, 4.957936982 },
3870 { 0.000108e-6, 23543.230504682, 1.390113589 },
3871 { 0.000106e-6, -12569.674818332, 0.429631317 },
3872 { 0.000110e-6, -266.607041722, 5.501340197 },
3873 { 0.000115e-6, 12559.038152982, 4.691456618 },
3874 /* 671, 680 */
3875 { 0.000134e-6, -2388.894020449, 0.577313584 },
3876 { 0.000109e-6, 10440.274292604, 6.218148717 },
3877 { 0.000102e-6, -543.918059096, 1.477842615 },
3878 { 0.000108e-6, 21228.392023546, 2.237753948 },
3879 { 0.000101e-6, -4535.059436924, 3.100492232 },
3880 { 0.000103e-6, 76.266071276, 5.594294322 },
3881 { 0.000104e-6, 949.175608970, 5.674287810 },
3882 { 0.000101e-6, 13517.870106233, 2.196632348 },
3883 { 0.000100e-6, 11933.367960670, 4.056084160 },
3884
3885 /* T^2 */
3886 { 4.322990e-6, 6283.075849991, 2.642893748 },
3887 /* 681, 690 */
3888 { 0.406495e-6, 0.000000000, 4.712388980 },
3889 { 0.122605e-6, 12566.151699983, 2.438140634 },
3890 { 0.019476e-6, 213.299095438, 1.642186981 },
3891 { 0.016916e-6, 529.690965095, 4.510959344 },
3892 { 0.013374e-6, -3.523118349, 1.502210314 },
3893 { 0.008042e-6, 26.298319800, 0.478549024 },
3894 { 0.007824e-6, 155.420399434, 5.254710405 },
3895 { 0.004894e-6, 5746.271337896, 4.683210850 },
3896 { 0.004875e-6, 5760.498431898, 0.759507698 },
3897 { 0.004416e-6, 5223.693919802, 6.028853166 },
3898 /* 691, 700 */
3899 { 0.004088e-6, -7.113547001, 0.060926389 },
3900 { 0.004433e-6, 77713.771467920, 3.627734103 },
3901 { 0.003277e-6, 18849.227549974, 2.327912542 },
3902 { 0.002703e-6, 6062.663207553, 1.271941729 },
3903 { 0.003435e-6, -775.522611324, 0.747446224 },
3904 { 0.002618e-6, 6076.890301554, 3.633715689 },
3905 { 0.003146e-6, 206.185548437, 5.647874613 },
3906 { 0.002544e-6, 1577.343542448, 6.232904270 },
3907 { 0.002218e-6, -220.412642439, 1.309509946 },
3908 { 0.002197e-6, 5856.477659115, 2.407212349 },
3909 /* 701, 710 */
3910 { 0.002897e-6, 5753.384884897, 5.863842246 },
3911 { 0.001766e-6, 426.598190876, 0.754113147 },
3912 { 0.001738e-6, -796.298006816, 2.714942671 },
3913 { 0.001695e-6, 522.577418094, 2.629369842 },
3914 { 0.001584e-6, 5507.553238667, 1.341138229 },
3915 { 0.001503e-6, -242.728603974, 0.377699736 },
3916 { 0.001552e-6, -536.804512095, 2.904684667 },
3917 { 0.001370e-6, -398.149003408, 1.265599125 },
3918 { 0.001889e-6, -5573.142801634, 4.413514859 },
3919 { 0.001722e-6, 6069.776754553, 2.445966339 },
3920 /* 711, 720 */
3921 { 0.001124e-6, 1059.381930189, 5.041799657 },
3922 { 0.001258e-6, 553.569402842, 3.849557278 },
3923 { 0.000831e-6, 951.718406251, 2.471094709 },
3924 { 0.000767e-6, 4694.002954708, 5.363125422 },
3925 { 0.000756e-6, 1349.867409659, 1.046195744 },
3926 { 0.000775e-6, -11.045700264, 0.245548001 },
3927 { 0.000597e-6, 2146.165416475, 4.543268798 },
3928 { 0.000568e-6, 5216.580372801, 4.178853144 },
3929 { 0.000711e-6, 1748.016413067, 5.934271972 },
3930 { 0.000499e-6, 12036.460734888, 0.624434410 },
3931 /* 721, 730 */
3932 { 0.000671e-6, -1194.447010225, 4.136047594 },
3933 { 0.000488e-6, 5849.364112115, 2.209679987 },
3934 { 0.000621e-6, 6438.496249426, 4.518860804 },
3935 { 0.000495e-6, -6286.598968340, 1.868201275 },
3936 { 0.000456e-6, 5230.807466803, 1.271231591 },
3937 { 0.000451e-6, 5088.628839767, 0.084060889 },
3938 { 0.000435e-6, 5643.178563677, 3.324456609 },
3939 { 0.000387e-6, 10977.078804699, 4.052488477 },
3940 { 0.000547e-6, 161000.685737473, 2.841633844 },
3941 { 0.000522e-6, 3154.687084896, 2.171979966 },
3942 /* 731, 740 */
3943 { 0.000375e-6, 5486.777843175, 4.983027306 },
3944 { 0.000421e-6, 5863.591206116, 4.546432249 },
3945 { 0.000439e-6, 7084.896781115, 0.522967921 },
3946 { 0.000309e-6, 2544.314419883, 3.172606705 },
3947 { 0.000347e-6, 4690.479836359, 1.479586566 },
3948 { 0.000317e-6, 801.820931124, 3.553088096 },
3949 { 0.000262e-6, 419.484643875, 0.606635550 },
3950 { 0.000248e-6, 6836.645252834, 3.014082064 },
3951 { 0.000245e-6, -1592.596013633, 5.519526220 },
3952 { 0.000225e-6, 4292.330832950, 2.877956536 },
3953 /* 741, 750 */
3954 { 0.000214e-6, 7234.794256242, 1.605227587 },
3955 { 0.000205e-6, 5767.611978898, 0.625804796 },
3956 { 0.000180e-6, 10447.387839604, 3.499954526 },
3957 { 0.000229e-6, 199.072001436, 5.632304604 },
3958 { 0.000214e-6, 639.897286314, 5.960227667 },
3959 { 0.000175e-6, -433.711737877, 2.162417992 },
3960 { 0.000209e-6, 515.463871093, 2.322150893 },
3961 { 0.000173e-6, 6040.347246017, 2.556183691 },
3962 { 0.000184e-6, 6309.374169791, 4.732296790 },
3963 { 0.000227e-6, 149854.400134205, 5.385812217 },
3964 /* 751, 760 */
3965 { 0.000154e-6, 8031.092263058, 5.120720920 },
3966 { 0.000151e-6, 5739.157790895, 4.815000443 },
3967 { 0.000197e-6, 7632.943259650, 0.222827271 },
3968 { 0.000197e-6, 74.781598567, 3.910456770 },
3969 { 0.000138e-6, 6055.549660552, 1.397484253 },
3970 { 0.000149e-6, -6127.655450557, 5.333727496 },
3971 { 0.000137e-6, 3894.181829542, 4.281749907 },
3972 { 0.000135e-6, 9437.762934887, 5.979971885 },
3973 { 0.000139e-6, -2352.866153772, 4.715630782 },
3974 { 0.000142e-6, 6812.766815086, 0.513330157 },
3975 /* 761, 770 */
3976 { 0.000120e-6, -4705.732307544, 0.194160689 },
3977 { 0.000131e-6, -71430.695617928, 0.000379226 },
3978 { 0.000124e-6, 6279.552731642, 2.122264908 },
3979 { 0.000108e-6, -6256.777530192, 0.883445696 },
3980
3981 /* T^3 */
3982 { 0.143388e-6, 6283.075849991, 1.131453581 },
3983 { 0.006671e-6, 12566.151699983, 0.775148887 },
3984 { 0.001480e-6, 155.420399434, 0.480016880 },
3985 { 0.000934e-6, 213.299095438, 6.144453084 },
3986 { 0.000795e-6, 529.690965095, 2.941595619 },
3987 { 0.000673e-6, 5746.271337896, 0.120415406 },
3988 /* 771, 780 */
3989 { 0.000672e-6, 5760.498431898, 5.317009738 },
3990 { 0.000389e-6, -220.412642439, 3.090323467 },
3991 { 0.000373e-6, 6062.663207553, 3.003551964 },
3992 { 0.000360e-6, 6076.890301554, 1.918913041 },
3993 { 0.000316e-6, -21.340641002, 5.545798121 },
3994 { 0.000315e-6, -242.728603974, 1.884932563 },
3995 { 0.000278e-6, 206.185548437, 1.266254859 },
3996 { 0.000238e-6, -536.804512095, 4.532664830 },
3997 { 0.000185e-6, 522.577418094, 4.578313856 },
3998 { 0.000245e-6, 18849.227549974, 0.587467082 },
3999 /* 781, 787 */
4000 { 0.000180e-6, 426.598190876, 5.151178553 },
4001 { 0.000200e-6, 553.569402842, 5.355983739 },
4002 { 0.000141e-6, 5223.693919802, 1.336556009 },
4003 { 0.000104e-6, 5856.477659115, 4.239842759 },
4004
4005 /* T^4 */
4006 { 0.003826e-6, 6283.075849991, 5.705257275 },
4007 { 0.000303e-6, 12566.151699983, 5.407132842 },
4008 { 0.000209e-6, 155.420399434, 1.989815753 }
4009 };
4010
4011
4012 /* Time since J2000.0 in Julian millennia. */
4013 t = ((date1 - DJ00) + date2) / DJM;
4014
4015 /* ================= */
4016 /* Topocentric terms */
4017 /* ================= */
4018
4019 /* Convert UT to local solar time in radians. */
4020 tsol = fmod(ut, 1.0) * D2PI + elong;
4021
4022 /* FUNDAMENTAL ARGUMENTS: Simon et al. 1994. */
4023
4024 /* Combine time argument (millennia) with deg/arcsec factor. */
4025 w = t / 3600.0;
4026
4027 /* Sun Mean Longitude. */
4028 elsun = fmod(280.46645683 + 1296027711.03429 * w, 360.0) * DD2R;
4029
4030 /* Sun Mean Anomaly. */
4031 emsun = fmod(357.52910918 + 1295965810.481 * w, 360.0) * DD2R;
4032
4033 /* Mean Elongation of Moon from Sun. */
4034 d = fmod(297.85019547 + 16029616012.090 * w, 360.0) * DD2R;
4035
4036 /* Mean Longitude of Jupiter. */
4037 elj = fmod(34.35151874 + 109306899.89453 * w, 360.0) * DD2R;
4038
4039 /* Mean Longitude of Saturn. */
4040 els = fmod(50.07744430 + 44046398.47038 * w, 360.0) * DD2R;
4041
4042 /* TOPOCENTRIC TERMS: Moyer 1981 and Murray 1983. */
4043 wt = + 0.00029e-10 * u * sin(tsol + elsun - els)
4044 + 0.00100e-10 * u * sin(tsol - 2.0 * emsun)
4045 + 0.00133e-10 * u * sin(tsol - d)
4046 + 0.00133e-10 * u * sin(tsol + elsun - elj)
4047 - 0.00229e-10 * u * sin(tsol + 2.0 * elsun + emsun)
4048 - 0.02200e-10 * v * cos(elsun + emsun)
4049 + 0.05312e-10 * u * sin(tsol - emsun)
4050 - 0.13677e-10 * u * sin(tsol + 2.0 * elsun)
4051 - 1.31840e-10 * v * cos(elsun)
4052 + 3.17679e-10 * u * sin(tsol);
4053
4054 /* ===================== */
4055 /* Fairhead et al. model */
4056 /* ===================== */
4057
4058 /* T**0 */
4059 w0 = 0;
4060 for (j = 473; j >= 0; j--) {
4061 w0 += fairhd[j][0] * sin(fairhd[j][1] * t + fairhd[j][2]);
4062 }
4063
4064 /* T**1 */
4065 w1 = 0;
4066 for (j = 678; j >= 474; j--) {
4067 w1 += fairhd[j][0] * sin(fairhd[j][1] * t + fairhd[j][2]);
4068 }
4069
4070 /* T**2 */
4071 w2 = 0;
4072 for (j = 763; j >= 679; j--) {
4073 w2 += fairhd[j][0] * sin(fairhd[j][1] * t + fairhd[j][2]);
4074 }
4075
4076 /* T**3 */
4077 w3 = 0;
4078 for (j = 783; j >= 764; j--) {
4079 w3 += fairhd[j][0] * sin(fairhd[j][1] * t + fairhd[j][2]);
4080 }
4081
4082 /* T**4 */
4083 w4 = 0;
4084 for (j = 786; j >= 784; j--) {
4085 w4 += fairhd[j][0] * sin(fairhd[j][1] * t + fairhd[j][2]);
4086 }
4087
4088 /* Multiply by powers of T and combine. */
4089 wf = t * (t * (t * (t * w4 + w3) + w2) + w1) + w0;
4090
4091 /* Adjustments to use JPL planetary masses instead of IAU. */
4092 wj = 0.00065e-6 * sin(6069.776754 * t + 4.021194) +
4093 0.00033e-6 * sin( 213.299095 * t + 5.543132) +
4094 (-0.00196e-6 * sin(6208.294251 * t + 5.696701)) +
4095 (-0.00173e-6 * sin( 74.781599 * t + 2.435900)) +
4096 0.03638e-6 * t * t;
4097
4098 /* ============ */
4099 /* Final result */
4100 /* ============ */
4101
4102 /* TDB-TT in seconds. */
4103 w = wt + wf + wj;
4104
4105 return w;
4106
4107 }
4108
4109
4110 /**
4111 * The equation of the equinoxes, compatible with IAU 2000 resolutions,
4112 * given the nutation in longitude and the mean obliquity.
4113 *
4114 *<p>This function is derived from the International Astronomical Union's
4115 * SOFA (Standards Of Fundamental Astronomy) software collection.
4116 *
4117 *<p>Status: canonical model.
4118 *
4119 *<!-- Given: -->
4120 * @param date1 double TT as a 2-part Julian Date (Note 1)
4121 * @param date2 double TT as a 2-part Julian Date (Note 1)
4122 * @param epsa double mean obliquity (Note 2)
4123 * @param dpsi double nutation in longitude (Note 3)
4124 *
4125 * <!-- Returned (function value): -->
4126 * @return double equation of the equinoxes (Note 4)
4127 *
4128 * <p>Notes:
4129 * <ol>
4130 *
4131 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
4132 * convenient way between the two arguments. For example,
4133 * JD(TT)=2450123.7 could be expressed in any of these ways,
4134 * among others:
4135 *<pre>
4136 * date1 date2
4137 *
4138 * 2450123.7 0.0 (JD method)
4139 * 2451545.0 -1421.3 (J2000 method)
4140 * 2400000.5 50123.2 (MJD method)
4141 * 2450123.5 0.2 (date & time method)
4142 *</pre>
4143 * The JD method is the most natural and convenient to use in
4144 * cases where the loss of several decimal digits of resolution
4145 * is acceptable. The J2000 method is best matched to the way
4146 * the argument is handled internally and will deliver the
4147 * optimum resolution. The MJD method and the date & time methods
4148 * are both good compromises between resolution and convenience.
4149 *
4150 * <li> The obliquity, in radians, is mean of date.
4151 *
4152 * <li> The result, which is in radians, operates in the following sense:
4153 *
4154 * Greenwich apparent ST = GMST + equation of the equinoxes
4155 *
4156 * <li> The result is compatible with the IAU 2000 resolutions. For
4157 * further details, see IERS Conventions 2003 and Capitaine et al.
4158 * (2002).
4159 *</ol>
4160 *<p>Called:<ul>
4161 * <li>{@link #jauEect00} equation of the equinoxes complementary terms
4162 * </ul>
4163 *
4164 *
4165 * <p>Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
4166 * implement the IAU 2000 definition of UT1", Astronomy &
4167 * Astrophysics, 406, 1135-1149 (2003)
4168 *
4169 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
4170 * IERS Technical Note No. 32, BKG (2004)
4171 *
4172 *@version 2008 May 16
4173 *
4174 * @since Release 20101201
4175 *
4176 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
4177 */
4178 public static double jauEe00(double date1, double date2, double epsa, double dpsi)
4179 {
4180 double ee;
4181
4182
4183 /* Equation of the equinoxes. */
4184 ee = dpsi * cos(epsa) + jauEect00(date1, date2);
4185
4186 return ee;
4187
4188 }
4189
4190
4191 /**
4192 * Equation of the equinoxes, compatible with IAU 2000 resolutions.
4193 *
4194 *<p>This function is derived from the International Astronomical Union's
4195 * SOFA (Standards Of Fundamental Astronomy) software collection.
4196 *
4197 *<p>Status: support function.
4198 *
4199 *<!-- Given: -->
4200 * @param date1 double TT as a 2-part Julian Date (Note 1)
4201 * @param date2 double TT as a 2-part Julian Date (Note 1)
4202 *
4203 * <!-- Returned (function value): -->
4204 * @return double equation of the equinoxes (Note 2)
4205 *
4206 * <p>Notes:
4207 * <ol>
4208 *
4209 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
4210 * convenient way between the two arguments. For example,
4211 * JD(TT)=2450123.7 could be expressed in any of these ways,
4212 * among others:
4213 *<pre>
4214 * date1 date2
4215 *
4216 * 2450123.7 0.0 (JD method)
4217 * 2451545.0 -1421.3 (J2000 method)
4218 * 2400000.5 50123.2 (MJD method)
4219 * 2450123.5 0.2 (date & time method)
4220 *</pre>
4221 * The JD method is the most natural and convenient to use in
4222 * cases where the loss of several decimal digits of resolution
4223 * is acceptable. The J2000 method is best matched to the way
4224 * the argument is handled internally and will deliver the
4225 * optimum resolution. The MJD method and the date & time methods
4226 * are both good compromises between resolution and convenience.
4227 *
4228 * <li> The result, which is in radians, operates in the following sense:
4229 *
4230 * Greenwich apparent ST = GMST + equation of the equinoxes
4231 *
4232 * <li> The result is compatible with the IAU 2000 resolutions. For
4233 * further details, see IERS Conventions 2003 and Capitaine et al.
4234 * (2002).
4235 *</ol>
4236 *<p>Called:<ul>
4237 * <li>{@link #jauPr00} IAU 2000 precession adjustments
4238 * <li>{@link #jauObl80} mean obliquity, IAU 1980
4239 * <li>{@link #jauNut00a} nutation, IAU 2000A
4240 * <li>{@link #jauEe00} equation of the equinoxes, IAU 2000
4241 * </ul>
4242 *<p>References:
4243 *
4244 * <p>Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
4245 * implement the IAU 2000 definition of UT1", Astronomy &
4246 * Astrophysics, 406, 1135-1149 (2003).
4247 *
4248 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
4249 * IERS Technical Note No. 32, BKG (2004).
4250 *
4251 *@version 2008 May 16
4252 *
4253 * @since Release 20101201
4254 *
4255 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
4256 */
4257 public static double jauEe00a(double date1, double date2)
4258 {
4259 double epsa, ee;
4260
4261
4262 /* IAU 2000 precession-rate adjustments. */
4263 PrecessionDeltaTerms nutd = jauPr00(date1, date2);
4264
4265 /* Mean obliquity, consistent with IAU 2000 precession-nutation. */
4266 epsa = jauObl80(date1, date2) + nutd.depspr;
4267
4268 /* Nutation in longitude. */
4269 NutationTerms nut = jauNut00a(date1, date2);
4270
4271 /* Equation of the equinoxes. */
4272 ee = jauEe00(date1, date2, epsa, nut.dpsi);
4273
4274 return ee;
4275
4276 }
4277
4278
4279 /**
4280 * Equation of the equinoxes, compatible with IAU 2000 resolutions but
4281 * using the truncated nutation model IAU 2000B.
4282 *
4283 *<p>This function is derived from the International Astronomical Union's
4284 * SOFA (Standards Of Fundamental Astronomy) software collection.
4285 *
4286 *<p>Status: support function.
4287 *
4288 *<!-- Given: -->
4289 * @param date1 double TT as a 2-part Julian Date (Note 1)
4290 * @param date2 double TT as a 2-part Julian Date (Note 1)
4291 *
4292 * <!-- Returned (function value): -->
4293 * @return double equation of the equinoxes (Note 2)
4294 *
4295 * <p>Notes:
4296 * <ol>
4297 *
4298 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
4299 * convenient way between the two arguments. For example,
4300 * JD(TT)=2450123.7 could be expressed in any of these ways,
4301 * among others:
4302 *<pre>
4303 * date1 date2
4304 *
4305 * 2450123.7 0.0 (JD method)
4306 * 2451545.0 -1421.3 (J2000 method)
4307 * 2400000.5 50123.2 (MJD method)
4308 * 2450123.5 0.2 (date & time method)
4309 *</pre>
4310 * The JD method is the most natural and convenient to use in
4311 * cases where the loss of several decimal digits of resolution
4312 * is acceptable. The J2000 method is best matched to the way
4313 * the argument is handled internally and will deliver the
4314 * optimum resolution. The MJD method and the date & time methods
4315 * are both good compromises between resolution and convenience.
4316 *
4317 * <li> The result, which is in radians, operates in the following sense:
4318 *
4319 * Greenwich apparent ST = GMST + equation of the equinoxes
4320 *
4321 * <li> The result is compatible with the IAU 2000 resolutions except
4322 * that accuracy has been compromised for the sake of speed. For
4323 * further details, see McCarthy & Luzum (2001), IERS Conventions
4324 * 2003 and Capitaine et al. (2003).
4325 *</ol>
4326 *<p>Called:<ul>
4327 * <li>{@link #jauPr00} IAU 2000 precession adjustments
4328 * <li>{@link #jauObl80} mean obliquity, IAU 1980
4329 * <li>{@link #jauNut00b} nutation, IAU 2000B
4330 * <li>{@link #jauEe00} equation of the equinoxes, IAU 2000
4331 * </ul>
4332 *
4333 *
4334 * <p>Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
4335 * implement the IAU 2000 definition of UT1", Astronomy &
4336 * Astrophysics, 406, 1135-1149 (2003)
4337 *
4338 * <p>McCarthy, D.D. & Luzum, B.J., "An abridged model of the
4339 * precession-nutation of the celestial pole", Celestial Mechanics &
4340 * Dynamical Astronomy, 85, 37-49 (2003)
4341 *
4342 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
4343 * IERS Technical Note No. 32, BKG (2004)
4344 *
4345 *@version 2008 May 18
4346 *
4347 * @since Release 20101201
4348 *
4349 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
4350 */
4351 public static double jauEe00b(double date1, double date2)
4352 {
4353 double ee;
4354
4355
4356 /* IAU 2000 precession-rate adjustments. */
4357 PrecessionDeltaTerms nutd = jauPr00(date1, date2);
4358
4359 /* Mean obliquity, consistent with IAU 2000 precession-nutation. */
4360 double epsa = jauObl80(date1, date2) + nutd.depspr;
4361
4362 /* Nutation in longitude. dpsi, deps*/
4363 NutationTerms nut = jauNut00b(date1, date2 );
4364
4365 /* Equation of the equinoxes. */
4366 ee = jauEe00(date1, date2, epsa, nut.dpsi);
4367
4368 return ee;
4369
4370 }
4371
4372 /**
4373 * Equation of the equinoxes, compatible with IAU 2000 resolutions and
4374 * IAU 2006/2000A precession-nutation.
4375 *
4376 *<p>This function is derived from the International Astronomical Union's
4377 * SOFA (Standards Of Fundamental Astronomy) software collection.
4378 *
4379 *<p>Status: support function.
4380 *
4381 *<!-- Given: -->
4382 * @param date1 double TT as a 2-part Julian Date (Note 1)
4383 * @param date2 double TT as a 2-part Julian Date (Note 1)
4384 *
4385 * <!-- Returned (function value): -->
4386 * @return double equation of the equinoxes (Note 2)
4387 *
4388 * <p>Notes:
4389 * <ol>
4390 *
4391 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
4392 * convenient way between the two arguments. For example,
4393 * JD(TT)=2450123.7 could be expressed in any of these ways,
4394 * among others:
4395 *<pre>
4396 * date1 date2
4397 *
4398 * 2450123.7 0.0 (JD method)
4399 * 2451545.0 -1421.3 (J2000 method)
4400 * 2400000.5 50123.2 (MJD method)
4401 * 2450123.5 0.2 (date & time method)
4402 *</pre>
4403 * The JD method is the most natural and convenient to use in
4404 * cases where the loss of several decimal digits of resolution
4405 * is acceptable. The J2000 method is best matched to the way
4406 * the argument is handled internally and will deliver the
4407 * optimum resolution. The MJD method and the date & time methods
4408 * are both good compromises between resolution and convenience.
4409 *
4410 * <li> The result, which is in radians, operates in the following sense:
4411 *
4412 * Greenwich apparent ST = GMST + equation of the equinoxes
4413 *</ol>
4414 *<p>Called:<ul>
4415 * <li>{@link #jauAnpm} normalize angle into range +/- pi
4416 * <li>{@link #jauGst06a} Greenwich apparent sidereal time, IAU 2006/2000A
4417 * <li>{@link #jauGmst06} Greenwich mean sidereal time, IAU 2006
4418 * </ul>
4419 *<p>Reference:
4420 *
4421 * <p>McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003),
4422 * IERS Technical Note No. 32, BKG
4423 *
4424 *@version 2008 May 18
4425 *
4426 * @since Release 20101201
4427 *
4428 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
4429 */
4430 public static double jauEe06a(double date1, double date2)
4431 {
4432 double gst06a, gmst06, ee;
4433
4434
4435 /* Apparent and mean sidereal times. */
4436 gst06a = jauGst06a(0.0, 0.0, date1, date2);
4437 gmst06 = jauGmst06(0.0, 0.0, date1, date2);
4438
4439 /* Equation of the equinoxes. */
4440 ee = jauAnpm(gst06a - gmst06);
4441
4442 return ee;
4443
4444 }
4445
4446 private static class TERM {
4447 final int nfa[]; /* coefficients of l,l',F,D,Om,LVe,LE,pA */
4448 final double s, c; /* sine and cosine coefficients */
4449 public TERM(int nfa[], double s, double c) {
4450 this.nfa = nfa;
4451 this.s = s;
4452 this.c = c;
4453 }
4454
4455 }
4456
4457
4458 /**
4459 * Equation of the equinoxes complementary terms, consistent with
4460 * IAU 2000 resolutions.
4461 *
4462 *<p>This function is derived from the International Astronomical Union's
4463 * SOFA (Standards Of Fundamental Astronomy) software collection.
4464 *
4465 *<p>Status: canonical model.
4466 *
4467 *<!-- Given: -->
4468 * @param date1 double TT as a 2-part Julian Date (Note 1)
4469 * @param date2 double TT as a 2-part Julian Date (Note 1)
4470 *
4471 * <!-- Returned (function value): -->
4472 * @return double complementary terms (Note 2)
4473 *
4474 * <p>Notes:
4475 * <ol>
4476 *
4477 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
4478 * convenient way between the two arguments. For example,
4479 * JD(TT)=2450123.7 could be expressed in any of these ways,
4480 * among others:
4481 *<pre>
4482 * date1 date2
4483 *
4484 * 2450123.7 0.0 (JD method)
4485 * 2451545.0 -1421.3 (J2000 method)
4486 * 2400000.5 50123.2 (MJD method)
4487 * 2450123.5 0.2 (date & time method)
4488 *</pre>
4489 * The JD method is the most natural and convenient to use in
4490 * cases where the loss of several decimal digits of resolution
4491 * is acceptable. The J2000 method is best matched to the way
4492 * the argument is handled internally and will deliver the
4493 * optimum resolution. The MJD method and the date & time methods
4494 * are both good compromises between resolution and convenience.
4495 *
4496 * <li> The "complementary terms" are part of the equation of the
4497 * equinoxes (EE), classically the difference between apparent and
4498 * mean Sidereal Time:
4499 *
4500 * GAST = GMST + EE
4501 *
4502 * with:
4503 *
4504 * EE = dpsi * cos(eps)
4505 *
4506 * where dpsi is the nutation in longitude and eps is the obliquity
4507 * of date. However, if the rotation of the Earth were constant in
4508 * an inertial frame the classical formulation would lead to
4509 * apparent irregularities in the UT1 timescale traceable to side-
4510 * effects of precession-nutation. In order to eliminate these
4511 * effects from UT1, "complementary terms" were introduced in 1994
4512 * (IAU, 1994) and took effect from 1997 (Capitaine and Gontier,
4513 * <li>:
4514 *
4515 * GAST = GMST + CT + EE
4516 *
4517 * By convention, the complementary terms are included as part of
4518 * the equation of the equinoxes rather than as part of the mean
4519 * Sidereal Time. This slightly compromises the "geometrical"
4520 * interpretation of mean sidereal time but is otherwise
4521 * inconsequential.
4522 *
4523 * The present function computes CT in the above expression,
4524 * compatible with IAU 2000 resolutions (Capitaine et al., 2002, and
4525 * IERS Conventions 2003).
4526 *</ol>
4527 *<p>Called:<ul>
4528 * <li>{@link #jauFal03} mean anomaly of the Moon
4529 * <li>{@link #jauFalp03} mean anomaly of the Sun
4530 * <li>{@link #jauFaf03} mean argument of the latitude of the Moon
4531 * <li>{@link #jauFad03} mean elongation of the Moon from the Sun
4532 * <li>{@link #jauFaom03} mean longitude of the Moon's ascending node
4533 * <li>{@link #jauFave03} mean longitude of Venus
4534 * <li>{@link #jauFae03} mean longitude of Earth
4535 * <li>{@link #jauFapa03} general accumulated precession in longitude
4536 * </ul>
4537 *<p>References:
4538 *
4539 * <p>Capitaine, N. & Gontier, A.-M., Astron. Astrophys., 275,
4540 * 645-650 (1993)
4541 *
4542 * <p>Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
4543 * implement the IAU 2000 definition of UT1", Astronomy &
4544 * Astrophysics, 406, 1135-1149 (2003)
4545 *
4546 * <p>IAU Resolution C7, Recommendation 3 (1994)
4547 *
4548 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
4549 * IERS Technical Note No. 32, BKG (2004)
4550 *
4551 *@version 2009 December 17
4552 *
4553 * @since Release 20101201
4554 *
4555 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
4556 */
4557 public static double jauEect00(double date1, double date2)
4558 {
4559 /* Time since J2000.0, in Julian centuries */
4560 double t;
4561
4562 /* Miscellaneous */
4563 int i, j;
4564 double a, s0, s1;
4565
4566 /* Fundamental arguments */
4567 double fa[] = new double[14];
4568
4569 /* Returned value. */
4570 double eect;
4571
4572 /* ----------------------------------------- */
4573 /* The series for the EE complementary terms */
4574 /* ----------------------------------------- */
4575
4576
4577 /* Terms of order t^0 */
4578 final TERM e0[] = {
4579
4580 /* 1-10 */
4581 new TERM(new int[]{ 0, 0, 0, 0, 1, 0, 0, 0}, 2640.96e-6, -0.39e-6 ),
4582 new TERM(new int[]{ 0, 0, 0, 0, 2, 0, 0, 0}, 63.52e-6, -0.02e-6 ),
4583 new TERM(new int[]{ 0, 0, 2, -2, 3, 0, 0, 0}, 11.75e-6, 0.01e-6 ),
4584 new TERM(new int[]{ 0, 0, 2, -2, 1, 0, 0, 0}, 11.21e-6, 0.01e-6 ),
4585 new TERM(new int[]{ 0, 0, 2, -2, 2, 0, 0, 0}, -4.55e-6, 0.00e-6 ),
4586 new TERM(new int[]{ 0, 0, 2, 0, 3, 0, 0, 0}, 2.02e-6, 0.00e-6 ),
4587 new TERM(new int[]{ 0, 0, 2, 0, 1, 0, 0, 0}, 1.98e-6, 0.00e-6 ),
4588 new TERM(new int[]{ 0, 0, 0, 0, 3, 0, 0, 0}, -1.72e-6, 0.00e-6 ),
4589 new TERM(new int[]{ 0, 1, 0, 0, 1, 0, 0, 0}, -1.41e-6, -0.01e-6 ),
4590 new TERM(new int[]{ 0, 1, 0, 0, -1, 0, 0, 0}, -1.26e-6, -0.01e-6 ),
4591
4592 /* 11-20 */
4593 new TERM(new int[]{ 1, 0, 0, 0, -1, 0, 0, 0}, -0.63e-6, 0.00e-6 ),
4594 new TERM(new int[]{ 1, 0, 0, 0, 1, 0, 0, 0}, -0.63e-6, 0.00e-6 ),
4595 new TERM(new int[]{ 0, 1, 2, -2, 3, 0, 0, 0}, 0.46e-6, 0.00e-6 ),
4596 new TERM(new int[]{ 0, 1, 2, -2, 1, 0, 0, 0}, 0.45e-6, 0.00e-6 ),
4597 new TERM(new int[]{ 0, 0, 4, -4, 4, 0, 0, 0}, 0.36e-6, 0.00e-6 ),
4598 new TERM(new int[]{ 0, 0, 1, -1, 1, -8, 12, 0}, -0.24e-6, -0.12e-6 ),
4599 new TERM(new int[]{ 0, 0, 2, 0, 0, 0, 0, 0}, 0.32e-6, 0.00e-6 ),
4600 new TERM(new int[]{ 0, 0, 2, 0, 2, 0, 0, 0}, 0.28e-6, 0.00e-6 ),
4601 new TERM(new int[]{ 1, 0, 2, 0, 3, 0, 0, 0}, 0.27e-6, 0.00e-6 ),
4602 new TERM(new int[]{ 1, 0, 2, 0, 1, 0, 0, 0}, 0.26e-6, 0.00e-6 ),
4603
4604 /* 21-30 */
4605 new TERM(new int[]{ 0, 0, 2, -2, 0, 0, 0, 0}, -0.21e-6, 0.00e-6 ),
4606 new TERM(new int[]{ 0, 1, -2, 2, -3, 0, 0, 0}, 0.19e-6, 0.00e-6 ),
4607 new TERM(new int[]{ 0, 1, -2, 2, -1, 0, 0, 0}, 0.18e-6, 0.00e-6 ),
4608 new TERM(new int[]{ 0, 0, 0, 0, 0, 8,-13, -1}, -0.10e-6, 0.05e-6 ),
4609 new TERM(new int[]{ 0, 0, 0, 2, 0, 0, 0, 0}, 0.15e-6, 0.00e-6 ),
4610 new TERM(new int[]{ 2, 0, -2, 0, -1, 0, 0, 0}, -0.14e-6, 0.00e-6 ),
4611 new TERM(new int[]{ 1, 0, 0, -2, 1, 0, 0, 0}, 0.14e-6, 0.00e-6 ),
4612 new TERM(new int[]{ 0, 1, 2, -2, 2, 0, 0, 0}, -0.14e-6, 0.00e-6 ),
4613 new TERM(new int[]{ 1, 0, 0, -2, -1, 0, 0, 0}, 0.14e-6, 0.00e-6 ),
4614 new TERM(new int[]{ 0, 0, 4, -2, 4, 0, 0, 0}, 0.13e-6, 0.00e-6 ),
4615
4616 /* 31-33 */
4617 new TERM(new int[]{ 0, 0, 2, -2, 4, 0, 0, 0}, -0.11e-6, 0.00e-6 ),
4618 new TERM(new int[]{ 1, 0, -2, 0, -3, 0, 0, 0}, 0.11e-6, 0.00e-6 ),
4619 new TERM(new int[]{ 1, 0, -2, 0, -1, 0, 0, 0}, 0.11e-6, 0.00e-6 )
4620 };
4621
4622 /* Terms of order t^1 */
4623 final TERM e1[] = {
4624 new TERM(new int[]{ 0, 0, 0, 0, 1, 0, 0, 0}, -0.87e-6, 0.00e-6 )
4625 };
4626
4627 /* Number of terms in the series */
4628 final int NE0 = e0.length;
4629 final int NE1 = e1.length;
4630
4631 /*--------------------------------------------------------------------*/
4632
4633 /* Interval between fundamental epoch J2000.0 and current date (JC). */
4634 t = ((date1 - DJ00) + date2) / DJC;
4635
4636 /* Fundamental Arguments (from IERS Conventions 2003) */
4637
4638 /* Mean anomaly of the Moon. */
4639 fa[0] = jauFal03(t);
4640
4641 /* Mean anomaly of the Sun. */
4642 fa[1] = jauFalp03(t);
4643
4644 /* Mean longitude of the Moon minus that of the ascending node. */
4645 fa[2] = jauFaf03(t);
4646
4647 /* Mean elongation of the Moon from the Sun. */
4648 fa[3] = jauFad03(t);
4649
4650 /* Mean longitude of the ascending node of the Moon. */
4651 fa[4] = jauFaom03(t);
4652
4653 /* Mean longitude of Venus. */
4654 fa[5] = jauFave03(t);
4655
4656 /* Mean longitude of Earth. */
4657 fa[6] = jauFae03(t);
4658
4659 /* General precession in longitude. */
4660 fa[7] = jauFapa03(t);
4661
4662 /* Evaluate the EE complementary terms. */
4663 s0 = 0.0;
4664 s1 = 0.0;
4665
4666 for (i = NE0-1; i >= 0; i--) {
4667 a = 0.0;
4668 for (j = 0; j < 8; j++) {
4669 a += (double)(e0[i].nfa[j]) * fa[j];
4670 }
4671 s0 += e0[i].s * sin(a) + e0[i].c * cos(a);
4672 }
4673
4674 for (i = NE1-1; i >= 0; i--) {
4675 a = 0.0;
4676 for (j = 0; j < 8; j++) {
4677 a += (double)(e1[i].nfa[j]) * fa[j];
4678 }
4679 s1 += e1[i].s * sin(a) + e1[i].c * cos(a);
4680 }
4681
4682 eect = (s0 + s1 * t ) * DAS2R;
4683
4684 return eect;
4685
4686 }
4687
4688 /**
4689 * Reference Ellipsoid of Earth.
4690 *
4691 * The ellipsoid parameters are returned in the form of equatorial
4692 * radius in meters (a) and flattening (f). The latter is a number
4693 * around 0.00335, i.e. around 1/298.
4694 *
4695 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 1 Feb 2010
4696 *
4697 * @since AIDA Stage 1
4698 */
4699 public static class ReferenceEllipsoid{
4700 /** equatorial radius (meters, Note 2) */
4701 public double a;
4702 /** flattening (Note 2) */
4703 public double f ;
4704 public ReferenceEllipsoid(double a, double f ) {
4705 this.a = a;
4706 this.f = f;
4707 }
4708 }
4709 /**
4710 * Earth reference ellipsoids.
4711 *
4712 *<p>This function is derived from the International Astronomical Union's
4713 * JSOFA (Standards of Fundamental Astronomy) software collection.
4714 *
4715 *<p>Status: canonical.
4716 *
4717 *<!-- Given: -->
4718 * @param n int ellipsoid identifier (Note 1)
4719 *
4720 *<!-- Returned: -->
4721 * @return a double <u>returned</u> equatorial radius (meters, Note 2)
4722 * f double <u>returned</u> flattening (Note 2)
4723 *
4724 * <!-- Returned (function value): -->
4725 * @throws JSOFAIllegalParameter
4726 * int status:
4727 * 0 = OK
4728 * -1 = illegal identifier (Note 3)
4729 *
4730 * <p>Notes:
4731 * <ol>
4732 *
4733 * <li> The identifier n is a number that specifies the choice of
4734 * reference ellipsoid. The following are supported:
4735 *
4736 * n ellipsoid
4737 *
4738 * 1 WGS84
4739 * 2 GRS80
4740 * 3 WGS72
4741 *
4742 * The number n has no significance outside the JSOFA software.
4743 *
4744 * <li> The ellipsoid parameters are returned in the form of equatorial
4745 * radius in meters (a) and flattening (f). The latter is a number
4746 * around 0.00335, i.e. around 1/298.
4747 *
4748 * <li> For the case where an unsupported n value is supplied, zero a and
4749 * f are returned, as well as error status.
4750 *</ol>
4751 *<p>References:
4752 *
4753 * <p>Department of Defense World Geodetic System 1984, National
4754 * Imagery and Mapping Agency Technical Report 8350.2, Third
4755 * Edition, p3-2.
4756 *
4757 * <p>Moritz, H., Bull. Geodesique 66-2, 187 (1992).
4758 *
4759 * <p>The Department of Defense World Geodetic System 1972, World
4760 * Geodetic System Committee, May 1974.
4761 *
4762 * <p>Explanatory Supplement to the Astronomical Almanac,
4763 * P. Kenneth Seidelmann (ed), University Science Books (1992),
4764 * p220.
4765 *
4766 *@version 2010 January 18
4767 *
4768 * @since Release 20101201
4769 *
4770 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
4771 */
4772 public static ReferenceEllipsoid jauEform ( int n ) throws JSOFAIllegalParameter
4773 {
4774 double a,f;
4775 /* Look up a and f for the specified reference ellipsoid. */
4776 switch ( n ) {
4777 case 1:
4778
4779 /* WGS84. */
4780 a = 6378137.0;
4781 f = 1.0 / 298.257223563;
4782 break;
4783
4784 case 2:
4785
4786 /* GRS80. */
4787 a = 6378137.0;
4788 f = 1.0 / 298.257222101;
4789 break;
4790
4791 case 3:
4792
4793 /* WGS72. */
4794 a = 6378135.0;
4795 f = 1.0 / 298.26;
4796 break;
4797
4798 default:
4799
4800 /* Invalid identifier. */
4801 a = 0.0;
4802 f = 0.0;
4803 throw new JSOFAIllegalParameter("illegal ellipsoid identifier", -1);
4804
4805 }
4806
4807 /* OK status. */
4808 return new ReferenceEllipsoid(a, f);
4809
4810
4811 }
4812
4813
4814 /**
4815 * Equation of the origins, IAU 2006 precession and IAU 2000A nutation.
4816 *
4817 *<p>This function is derived from the International Astronomical Union's
4818 * SOFA (Standards Of Fundamental Astronomy) software collection.
4819 *
4820 *<p>Status: support function.
4821 *
4822 *<!-- Given: -->
4823 * @param date1 double TT as a 2-part Julian Date (Note 1)
4824 * @param date2 double TT as a 2-part Julian Date (Note 1)
4825 *
4826 * <!-- Returned (function value): -->
4827 * @return double equation of the origins in radians
4828 *
4829 * <p>Notes:
4830 * <ol>
4831 *
4832 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
4833 * convenient way between the two arguments. For example,
4834 * JD(TT)=2450123.7 could be expressed in any of these ways,
4835 * among others:
4836 *<pre>
4837 * date1 date2
4838 *
4839 * 2450123.7 0.0 (JD method)
4840 * 2451545.0 -1421.3 (J2000 method)
4841 * 2400000.5 50123.2 (MJD method)
4842 * 2450123.5 0.2 (date & time method)
4843 *</pre>
4844 * The JD method is the most natural and convenient to use in
4845 * cases where the loss of several decimal digits of resolution
4846 * is acceptable. The J2000 method is best matched to the way
4847 * the argument is handled internally and will deliver the
4848 * optimum resolution. The MJD method and the date & time methods
4849 * are both good compromises between resolution and convenience.
4850 *
4851 * <li> The equation of the origins is the distance between the true
4852 * equinox and the celestial intermediate origin and, equivalently,
4853 * the difference between Earth rotation angle and Greenwich
4854 * apparent sidereal time (ERA-GST). It comprises the precession
4855 * (since J2000.0) in right ascension plus the equation of the
4856 * equinoxes (including the small correction terms).
4857 *</ol>
4858 *<p>Called:<ul>
4859 * <li>{@link #jauPnm06a} classical NPB matrix, IAU 2006/2000A
4860 * <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
4861 * <li>{@link #jauS06} the CIO locator s, given X,Y, IAU 2006
4862 * <li>{@link #jauEors} equation of the origins, Given NPB matrix and s
4863 * </ul>
4864 *<p>References:
4865 *
4866 * <p>Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855
4867 *
4868 * <p>Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981
4869 *
4870 *@version 2008 May 16
4871 *
4872 * @since Release 20101201
4873 *
4874 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
4875 */
4876 public static double jauEo06a(double date1, double date2)
4877 {
4878 double r[][], s, eo;
4879
4880
4881 /* Classical nutation x precession x bias matrix. */
4882 r = jauPnm06a(date1, date2);
4883
4884 /* Extract CIP coordinates. */
4885 CelestialIntermediatePole cip = jauBpn2xy(r);
4886
4887 /* The CIO locator, s. */
4888 s = jauS06(date1, date2, cip.x, cip.y);
4889
4890 /* Solve for the EO. */
4891 eo = jauEors(r, s);
4892
4893 return eo;
4894
4895 }
4896
4897
4898 /**
4899 * Equation of the origins, given the classical NPB matrix and the
4900 * quantity s.
4901 *
4902 *<p>This function is derived from the International Astronomical Union's
4903 * SOFA (Standards Of Fundamental Astronomy) software collection.
4904 *
4905 *<p>Status: support function.
4906 *
4907 *<!-- Given: -->
4908 * @param rnpb double[3][3] classical nutation x precession x bias matrix
4909 * @param s double the quantity s (the CIO locator)
4910 *
4911 * <!-- Returned (function value): -->
4912 * @return double the equation of the origins in radians.
4913 *
4914 * <p>Notes:
4915 * <ol>
4916 *
4917 * <li> The equation of the origins is the distance between the true
4918 * equinox and the celestial intermediate origin and, equivalently,
4919 * the difference between Earth rotation angle and Greenwich
4920 * apparent sidereal time (ERA-GST). It comprises the precession
4921 * (since J2000.0) in right ascension plus the equation of the
4922 * equinoxes (including the small correction terms).
4923 *
4924 * <li> The algorithm is from Wallace & Capitaine (2006).
4925 *</ol>
4926 * References:
4927 *
4928 * <p>Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855
4929 *
4930 * <p>Wallace, P. & Capitaine, N., 2006, Astron.Astrophys. 459, 981
4931 *
4932 *@version 2008 May 26
4933 *
4934 * @since Release 20101201
4935 *
4936 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
4937 */
4938 public static double jauEors(double rnpb[][], double s)
4939 {
4940 double x, ax, xs, ys, zs, p, q, eo;
4941
4942
4943 /* Evaluate Wallace & Capitaine (2006) expression (16). */
4944 x = rnpb[2][0];
4945 ax = x / (1.0 + rnpb[2][2]);
4946 xs = 1.0 - ax * x;
4947 ys = -ax * rnpb[2][1];
4948 zs = -x;
4949 p = rnpb[0][0] * xs + rnpb[0][1] * ys + rnpb[0][2] * zs;
4950 q = rnpb[1][0] * xs + rnpb[1][1] * ys + rnpb[1][2] * zs;
4951 eo = ((p != 0) || (q != 0)) ? s - atan2(q, p) : s;
4952
4953 return eo;
4954
4955 }
4956
4957
4958 /**
4959 * Julian Date to Besselian Epoch.
4960 *
4961 *<p>This function is derived from the International Astronomical Union's
4962 * SOFA (Standards Of Fundamental Astronomy) software collection.
4963 *
4964 *<p>Status: support function.
4965 *
4966 *<!-- Given: -->
4967 * @param dj1 double Julian Date (see note)
4968 * @param dj2 double Julian Date (see note)
4969 *
4970 * <!-- Returned (function value): -->
4971 * @return double Besselian Epoch.
4972 *
4973 * Note:
4974 *
4975 * The Julian Date is supplied in two pieces, in the usual JSOFA
4976 * manner, which is designed to preserve time resolution. The
4977 * Julian Date is available as a single number by adding dj1 and
4978 * dj2. The maximum resolution is achieved if dj1 is 2451545D0
4979 * (J2000.0).
4980 *
4981 *<p>Reference:
4982 *
4983 * Lieske,J.H., 1979. Astron.Astrophys.,73,282.
4984 *
4985 *@version 2009 December 16
4986 *
4987 * @since Release 20101201
4988 *
4989 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
4990 */
4991 public static double jauEpb(double dj1, double dj2)
4992 {
4993 /* J2000.0 minus B1900.0 (2415019.81352) in Julian days */
4994 final double D1900 = 36524.68648;
4995
4996 return 1900.0 + ((dj1 - DJ00) + (dj2 + D1900)) / DTY;
4997
4998 }
4999
5000 /**
5001 * Besselian Epoch to Julian Date.
5002 *
5003 *<p>This function is derived from the International Astronomical Union's
5004 * SOFA (Standards Of Fundamental Astronomy) software collection.
5005 *
5006 *<p>Status: support function.
5007 *
5008 *<!-- Given: -->
5009 * @param epb double Besselian Epoch (e.g. 1957.3D0)
5010 *
5011 *<!-- Returned: -->
5012 * @return MJD zero-point: always 2400000.5 Modified Julian Date
5013 *
5014 * Note:
5015 *
5016 * The Julian Date is returned in two pieces, in the usual JSOFA
5017 * manner, which is designed to preserve time resolution. The
5018 * Julian Date is available as a single number by adding djm0 and
5019 * djm.
5020 *
5021 *<p>Reference:
5022 *
5023 * <p>Lieske, J.H., 1979, Astron.Astrophys. 73, 282.
5024 *
5025 *@version 2008 May 24
5026 *
5027 * @since Release 20101201
5028 *
5029 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
5030 */
5031 public static JulianDate jauEpb2jd(double epb)
5032 {
5033 double djm0, djm;
5034 djm0 = 2400000.5;
5035 djm = 15019.81352 + (epb - 1900.0) * DTY;
5036
5037 return new JulianDate(djm0, djm);
5038
5039 }
5040
5041
5042 /**
5043 * Julian Date to Julian Epoch.
5044 *
5045 *<p>This function is derived from the International Astronomical Union's
5046 * SOFA (Standards Of Fundamental Astronomy) software collection.
5047 *
5048 *<p>Status: support function.
5049 *
5050 *<!-- Given: -->
5051 * @param dj1 double Julian Date (see note)
5052 * @param dj2 double Julian Date (see note)
5053 *
5054 * <!-- Returned (function value): -->
5055 * @return double Julian Epoch
5056 *
5057 * Note:
5058 *
5059 * The Julian Date is supplied in two pieces, in the usual JSOFA
5060 * manner, which is designed to preserve time resolution. The
5061 * Julian Date is available as a single number by adding dj1 and
5062 * dj2. The maximum resolution is achieved if dj1 is 2451545D0
5063 * (J2000.0).
5064 *
5065 *<p>Reference:
5066 *
5067 * <p>Lieske, J.H., 1979, Astron.Astrophys. 73, 282.
5068 *
5069 *@version 2009 December 16
5070 *
5071 * @since Release 20101201
5072 *
5073 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
5074 */
5075 public static double jauEpj(double dj1, double dj2)
5076 {
5077 return 2000.0 + ((dj1 - DJ00) + dj2) / DJY;
5078
5079 }
5080
5081
5082 /**
5083 * Julian Epoch to Julian Date.
5084 *
5085 *<p>This function is derived from the International Astronomical Union's
5086 * SOFA (Standards Of Fundamental Astronomy) software collection.
5087 *
5088 *<p>Status: support function.
5089 *
5090 *<!-- Given: -->
5091 * @param epj double Julian Epoch (e.g. 1996.8D0)
5092 *
5093 *<!-- Returned: -->
5094 * @return MJD zero-point: always 2400000.5 Modified Julian Date
5095 *
5096 * Note:
5097 *
5098 * The Julian Date is returned in two pieces, in the usual JSOFA
5099 * manner, which is designed to preserve time resolution. The
5100 * Julian Date is available as a single number by adding djm0 and
5101 * djm.
5102 *
5103 *<p>Reference:
5104 *
5105 * <p>Lieske, J.H., 1979, Astron.Astrophys. 73, 282.
5106 *
5107 *@version 2008 May 11
5108 *
5109 * @since Release 20101201
5110 *
5111 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
5112 */
5113 public static JulianDate jauEpj2jd(double epj)
5114 {
5115 double djm0, djm;
5116 djm0 = 2400000.5;
5117 djm = 51544.5 + (epj - 2000.0) * 365.25;
5118
5119 return new JulianDate(djm0, djm);
5120
5121 }
5122
5123
5124 /*
5125 * A utility class to get round 65536 byte limit on functions in java - The static initializer is too large on its own. - So split into two classes for no real semantic reason
5126 */
5127 static private final class Ephemeris extends SSB {
5128
5129
5130 /**
5131 * ----------------------
5132 * Ephemeris Coefficients
5133 * ----------------------
5134 *
5135 * The ephemeris consists of harmonic terms for predicting (i) the Sun
5136 * to Earth vector and (ii) the Solar-System-barycenter to Sun vector
5137 * respectively. The coefficients are stored in arrays which, although
5138 * 1-demensional, contain groups of three. Each triplet of
5139 * coefficients is the amplitude, phase and frequency for one term in
5140 * the model, and each array contains the number of terms called for by
5141 * the model.
5142 *
5143 * There are eighteen such arrays, named as follows:
5144 *<pre>
5145 * array model power of T component
5146 *
5147 * e0x Sun-to-Earth 0 x
5148 * e0y Sun-to-Earth 0 y
5149 * e0z Sun-to-Earth 0 z
5150 *
5151 * e1x Sun-to-Earth 1 x
5152 * e1y Sun-to-Earth 1 y
5153 * e1z Sun-to-Earth 1 z
5154 *
5155 * e2x Sun-to-Earth 2 x
5156 * e2y Sun-to-Earth 2 y
5157 * e2z Sun-to-Earth 2 z
5158 *
5159 * s0x SSB-to-Sun 0 x
5160 * s0y SSB-to-Sun 0 y
5161 * s0z SSB-to-Sun 0 z
5162 *
5163 * s1x SSB-to-Sun 1 x
5164 * s1y SSB-to-Sun 1 y
5165 * s1z SSB-to-Sun 1 z
5166 *
5167 * s2x SSB-to-Sun 2 x
5168 * s2y SSB-to-Sun 2 y
5169 * s2z SSB-to-Sun 2 z
5170 *<pre>
5171 */
5172
5173 /* Sun-to-Earth, T^0, X */
5174 static final double e0x[] = {
5175 0.9998292878132e+00, 0.1753485171504e+01, 0.6283075850446e+01,
5176 0.8352579567414e-02, 0.1710344404582e+01, 0.1256615170089e+02,
5177 0.5611445335148e-02, 0.0000000000000e+00, 0.0000000000000e+00,
5178 0.1046664295572e-03, 0.1667225416770e+01, 0.1884922755134e+02,
5179 0.3110842534677e-04, 0.6687513390251e+00, 0.8399684731857e+02,
5180 0.2552413503550e-04, 0.5830637358413e+00, 0.5296909721118e+00,
5181 0.2137207845781e-04, 0.1092330954011e+01, 0.1577343543434e+01,
5182 0.1680240182951e-04, 0.4955366134987e+00, 0.6279552690824e+01,
5183 0.1679012370795e-04, 0.6153014091901e+01, 0.6286599010068e+01,
5184 0.1445526946777e-04, 0.3472744100492e+01, 0.2352866153506e+01,
5185
5186 0.1091038246184e-04, 0.3689845786119e+01, 0.5223693906222e+01,
5187 0.9344399733932e-05, 0.6073934645672e+01, 0.1203646072878e+02,
5188 0.8993182910652e-05, 0.3175705249069e+01, 0.1021328554739e+02,
5189 0.5665546034116e-05, 0.2152484672246e+01, 0.1059381944224e+01,
5190 0.6844146703035e-05, 0.1306964099750e+01, 0.5753384878334e+01,
5191 0.7346610905565e-05, 0.4354980070466e+01, 0.3981490189893e+00,
5192 0.6815396474414e-05, 0.2218229211267e+01, 0.4705732307012e+01,
5193 0.6112787253053e-05, 0.5384788425458e+01, 0.6812766822558e+01,
5194 0.4518120711239e-05, 0.6087604012291e+01, 0.5884926831456e+01,
5195 0.4521963430706e-05, 0.1279424524906e+01, 0.6256777527156e+01,
5196
5197 0.4497426764085e-05, 0.5369129144266e+01, 0.6309374173736e+01,
5198 0.4062190566959e-05, 0.5436473303367e+00, 0.6681224869435e+01,
5199 0.5412193480192e-05, 0.7867838528395e+00, 0.7755226100720e+00,
5200 0.5469839049386e-05, 0.1461440311134e+01, 0.1414349524433e+02,
5201 0.5205264083477e-05, 0.4432944696116e+01, 0.7860419393880e+01,
5202 0.2149759935455e-05, 0.4502237496846e+01, 0.1150676975667e+02,
5203 0.2279109618501e-05, 0.1239441308815e+01, 0.7058598460518e+01,
5204 0.2259282939683e-05, 0.3272430985331e+01, 0.4694002934110e+01,
5205 0.2558950271319e-05, 0.2265471086404e+01, 0.1216800268190e+02,
5206 0.2561581447555e-05, 0.1454740653245e+01, 0.7099330490126e+00,
5207
5208 0.1781441115440e-05, 0.2962068630206e+01, 0.7962980379786e+00,
5209 0.1612005874644e-05, 0.1473255041006e+01, 0.5486777812467e+01,
5210 0.1818630667105e-05, 0.3743903293447e+00, 0.6283008715021e+01,
5211 0.1818601377529e-05, 0.6274174354554e+01, 0.6283142985870e+01,
5212 0.1554475925257e-05, 0.1624110906816e+01, 0.2513230340178e+02,
5213 0.2090948029241e-05, 0.5852052276256e+01, 0.1179062909082e+02,
5214 0.2000176345460e-05, 0.4072093298513e+01, 0.1778984560711e+02,
5215 0.1289535917759e-05, 0.5217019331069e+01, 0.7079373888424e+01,
5216 0.1281135307881e-05, 0.4802054538934e+01, 0.3738761453707e+01,
5217 0.1518229005692e-05, 0.8691914742502e+00, 0.2132990797783e+00,
5218
5219 0.9450128579027e-06, 0.4601859529950e+01, 0.1097707878456e+02,
5220 0.7781119494996e-06, 0.1844352816694e+01, 0.8827390247185e+01,
5221 0.7733407759912e-06, 0.3582790154750e+01, 0.5507553240374e+01,
5222 0.7350644318120e-06, 0.2695277788230e+01, 0.1589072916335e+01,
5223 0.6535928827023e-06, 0.3651327986142e+01, 0.1176985366291e+02,
5224 0.6324624183656e-06, 0.2241302375862e+01, 0.6262300422539e+01,
5225 0.6298565300557e-06, 0.4407122406081e+01, 0.6303851278352e+01,
5226 0.8587037089179e-06, 0.3024307223119e+01, 0.1672837615881e+03,
5227 0.8299954491035e-06, 0.6192539428237e+01, 0.3340612434717e+01,
5228 0.6311263503401e-06, 0.2014758795416e+01, 0.7113454667900e-02,
5229
5230 0.6005646745452e-06, 0.3399500503397e+01, 0.4136910472696e+01,
5231 0.7917715109929e-06, 0.2493386877837e+01, 0.6069776770667e+01,
5232 0.7556958099685e-06, 0.4159491740143e+01, 0.6496374930224e+01,
5233 0.6773228244949e-06, 0.4034162934230e+01, 0.9437762937313e+01,
5234 0.5370708577847e-06, 0.1562219163734e+01, 0.1194447056968e+01,
5235 0.5710804266203e-06, 0.2662730803386e+01, 0.6282095334605e+01,
5236 0.5709824583726e-06, 0.3985828430833e+01, 0.6284056366286e+01,
5237 0.5143950896447e-06, 0.1308144688689e+01, 0.6290189305114e+01,
5238 0.5088010604546e-06, 0.5352817214804e+01, 0.6275962395778e+01,
5239 0.4960369085172e-06, 0.2644267922349e+01, 0.6127655567643e+01,
5240
5241 0.4803137891183e-06, 0.4008844192080e+01, 0.6438496133249e+01,
5242 0.5731747768225e-06, 0.3794550174597e+01, 0.3154687086868e+01,
5243 0.4735947960579e-06, 0.6107118308982e+01, 0.3128388763578e+01,
5244 0.4808348796625e-06, 0.4771458618163e+01, 0.8018209333619e+00,
5245 0.4115073743137e-06, 0.3327111335159e+01, 0.8429241228195e+01,
5246 0.5230575889287e-06, 0.5305708551694e+01, 0.1336797263425e+02,
5247 0.5133977889215e-06, 0.5784230738814e+01, 0.1235285262111e+02,
5248 0.5065815825327e-06, 0.2052064793679e+01, 0.1185621865188e+02,
5249 0.4339831593868e-06, 0.3644994195830e+01, 0.1726015463500e+02,
5250 0.3952928638953e-06, 0.4930376436758e+01, 0.5481254917084e+01,
5251
5252 0.4898498111942e-06, 0.4542084219731e+00, 0.9225539266174e+01,
5253 0.4757490209328e-06, 0.3161126388878e+01, 0.5856477690889e+01,
5254 0.4727701669749e-06, 0.6214993845446e+00, 0.2544314396739e+01,
5255 0.3800966681863e-06, 0.3040132339297e+01, 0.4265981595566e+00,
5256 0.3257301077939e-06, 0.8064977360087e+00, 0.3930209696940e+01,
5257 0.3255810528674e-06, 0.1974147981034e+01, 0.2146165377750e+01,
5258 0.3252029748187e-06, 0.2845924913135e+01, 0.4164311961999e+01,
5259 0.3255505635308e-06, 0.3017900824120e+01, 0.5088628793478e+01,
5260 0.2801345211990e-06, 0.6109717793179e+01, 0.1256967486051e+02,
5261 0.3688987740970e-06, 0.2911550235289e+01, 0.1807370494127e+02,
5262
5263 0.2475153429458e-06, 0.2179146025856e+01, 0.2629832328990e-01,
5264 0.3033457749150e-06, 0.1994161050744e+01, 0.4535059491685e+01,
5265 0.2186743763110e-06, 0.5125687237936e+01, 0.1137170464392e+02,
5266 0.2764777032774e-06, 0.4822646860252e+00, 0.1256262854127e+02,
5267 0.2199028768592e-06, 0.4637633293831e+01, 0.1255903824622e+02,
5268 0.2046482824760e-06, 0.1467038733093e+01, 0.7084896783808e+01,
5269 0.2611209147507e-06, 0.3044718783485e+00, 0.7143069561767e+02,
5270 0.2286079656818e-06, 0.4764220356805e+01, 0.8031092209206e+01,
5271 0.1855071202587e-06, 0.3383637774428e+01, 0.1748016358760e+01,
5272 0.2324669506784e-06, 0.6189088449251e+01, 0.1831953657923e+02,
5273
5274 0.1709528015688e-06, 0.5874966729774e+00, 0.4933208510675e+01,
5275 0.2168156875828e-06, 0.4302994009132e+01, 0.1044738781244e+02,
5276 0.2106675556535e-06, 0.3800475419891e+01, 0.7477522907414e+01,
5277 0.1430213830465e-06, 0.1294660846502e+01, 0.2942463415728e+01,
5278 0.1388396901944e-06, 0.4594797202114e+01, 0.8635942003952e+01,
5279 0.1922258844190e-06, 0.4943044543591e+00, 0.1729818233119e+02,
5280 0.1888460058292e-06, 0.2426943912028e+01, 0.1561374759853e+03,
5281 0.1789449386107e-06, 0.1582973303499e+00, 0.1592596075957e+01,
5282 0.1360803685374e-06, 0.5197240440504e+01, 0.1309584267300e+02,
5283 0.1504038014709e-06, 0.3120360916217e+01, 0.1649636139783e+02,
5284
5285 0.1382769533389e-06, 0.6164702888205e+01, 0.7632943190217e+01,
5286 0.1438059769079e-06, 0.1437423770979e+01, 0.2042657109477e+02,
5287 0.1326303260037e-06, 0.3609688799679e+01, 0.1213955354133e+02,
5288 0.1159244950540e-06, 0.5463018167225e+01, 0.5331357529664e+01,
5289 0.1433118149136e-06, 0.6028909912097e+01, 0.7342457794669e+01,
5290 0.1234623148594e-06, 0.3109645574997e+01, 0.6279485555400e+01,
5291 0.1233949875344e-06, 0.3539359332866e+01, 0.6286666145492e+01,
5292 0.9927196061299e-07, 0.1259321569772e+01, 0.7234794171227e+01,
5293 0.1242302191316e-06, 0.1065949392609e+01, 0.1511046609763e+02,
5294 0.1098402195201e-06, 0.2192508743837e+01, 0.1098880815746e+02,
5295
5296 0.1158191395315e-06, 0.4054411278650e+01, 0.5729506548653e+01,
5297 0.9048475596241e-07, 0.5429764748518e+01, 0.9623688285163e+01,
5298 0.8889853269023e-07, 0.5046586206575e+01, 0.6148010737701e+01,
5299 0.1048694242164e-06, 0.2628858030806e+01, 0.6836645152238e+01,
5300 0.1112308378646e-06, 0.4177292719907e+01, 0.1572083878776e+02,
5301 0.8631729709901e-07, 0.1601345232557e+01, 0.6418140963190e+01,
5302 0.8527816951664e-07, 0.2463888997513e+01, 0.1471231707864e+02,
5303 0.7892139456991e-07, 0.3154022088718e+01, 0.2118763888447e+01,
5304 0.1051782905236e-06, 0.4795035816088e+01, 0.1349867339771e+01,
5305 0.1048219943164e-06, 0.2952983395230e+01, 0.5999216516294e+01,
5306
5307 0.7435760775143e-07, 0.5420547991464e+01, 0.6040347114260e+01,
5308 0.9869574106949e-07, 0.3695646753667e+01, 0.6566935184597e+01,
5309 0.9156886364226e-07, 0.3922675306609e+01, 0.5643178611111e+01,
5310 0.7006834356188e-07, 0.1233968624861e+01, 0.6525804586632e+01,
5311 0.9806170182601e-07, 0.1919542280684e+01, 0.2122839202813e+02,
5312 0.9052289673607e-07, 0.4615902724369e+01, 0.4690479774488e+01,
5313 0.7554200867893e-07, 0.1236863719072e+01, 0.1253985337760e+02,
5314 0.8215741286498e-07, 0.3286800101559e+00, 0.1097355562493e+02,
5315 0.7185178575397e-07, 0.5880942158367e+01, 0.6245048154254e+01,
5316 0.7130726476180e-07, 0.7674871987661e+00, 0.6321103546637e+01,
5317
5318 0.6650894461162e-07, 0.6987129150116e+00, 0.5327476111629e+01,
5319 0.7396888823688e-07, 0.3576824794443e+01, 0.5368044267797e+00,
5320 0.7420588884775e-07, 0.5033615245369e+01, 0.2354323048545e+02,
5321 0.6141181642908e-07, 0.9449927045673e+00, 0.1296430071988e+02,
5322 0.6373557924058e-07, 0.6206342280341e+01, 0.9517183207817e+00,
5323 0.6359474329261e-07, 0.5036079095757e+01, 0.1990745094947e+01,
5324 0.5740173582646e-07, 0.6105106371350e+01, 0.9555997388169e+00,
5325 0.7019864084602e-07, 0.7237747359018e+00, 0.5225775174439e+00,
5326 0.6398054487042e-07, 0.3976367969666e+01, 0.2407292145756e+02,
5327 0.7797092650498e-07, 0.4305423910623e+01, 0.2200391463820e+02,
5328
5329 0.6466760000900e-07, 0.3500136825200e+01, 0.5230807360890e+01,
5330 0.7529417043890e-07, 0.3514779246100e+01, 0.1842262939178e+02,
5331 0.6924571140892e-07, 0.2743457928679e+01, 0.1554202828031e+00,
5332 0.6220798650222e-07, 0.2242598118209e+01, 0.1845107853235e+02,
5333 0.5870209391853e-07, 0.2332832707527e+01, 0.6398972393349e+00,
5334 0.6263953473888e-07, 0.2191105358956e+01, 0.6277552955062e+01,
5335 0.6257781390012e-07, 0.4457559396698e+01, 0.6288598745829e+01,
5336 0.5697304945123e-07, 0.3499234761404e+01, 0.1551045220144e+01,
5337 0.6335438746791e-07, 0.6441691079251e+00, 0.5216580451554e+01,
5338 0.6377258441152e-07, 0.2252599151092e+01, 0.5650292065779e+01,
5339
5340 0.6484841818165e-07, 0.1992812417646e+01, 0.1030928125552e+00,
5341 0.4735551485250e-07, 0.3744672082942e+01, 0.1431416805965e+02,
5342 0.4628595996170e-07, 0.1334226211745e+01, 0.5535693017924e+00,
5343 0.6258152336933e-07, 0.4395836159154e+01, 0.2608790314060e+02,
5344 0.6196171366594e-07, 0.2587043007997e+01, 0.8467247584405e+02,
5345 0.6159556952126e-07, 0.4782499769128e+01, 0.2394243902548e+03,
5346 0.4987741172394e-07, 0.7312257619924e+00, 0.7771377146812e+02,
5347 0.5459280703142e-07, 0.3001376372532e+01, 0.6179983037890e+01,
5348 0.4863461189999e-07, 0.3767222128541e+01, 0.9027992316901e+02,
5349 0.5349912093158e-07, 0.3663594450273e+01, 0.6386168663001e+01,
5350
5351 0.5673725607806e-07, 0.4331187919049e+01, 0.6915859635113e+01,
5352 0.4745485060512e-07, 0.5816195745518e+01, 0.6282970628506e+01,
5353 0.4745379005326e-07, 0.8323672435672e+00, 0.6283181072386e+01,
5354 0.4049002796321e-07, 0.3785023976293e+01, 0.6254626709878e+01,
5355 0.4247084014515e-07, 0.2378220728783e+01, 0.7875671926403e+01,
5356 0.4026912363055e-07, 0.2864103423269e+01, 0.6311524991013e+01,
5357 0.4062935011774e-07, 0.2415408595975e+01, 0.3634620989887e+01,
5358 0.5347771048509e-07, 0.3343479309801e+01, 0.2515860172507e+02,
5359 0.4829494136505e-07, 0.2821742398262e+01, 0.5760498333002e+01,
5360 0.4342554404599e-07, 0.5624662458712e+01, 0.7238675589263e+01,
5361
5362 0.4021599184361e-07, 0.5557250275009e+00, 0.1101510648075e+02,
5363 0.4104900474558e-07, 0.3296691780005e+01, 0.6709674010002e+01,
5364 0.4376532905131e-07, 0.3814443999443e+01, 0.6805653367890e+01,
5365 0.3314590480650e-07, 0.3560229189250e+01, 0.1259245002418e+02,
5366 0.3232421839643e-07, 0.5185389180568e+01, 0.1066495398892e+01,
5367 0.3541176318876e-07, 0.3921381909679e+01, 0.9917696840332e+01,
5368 0.3689831242681e-07, 0.4190658955386e+01, 0.1192625446156e+02,
5369 0.3890605376774e-07, 0.5546023371097e+01, 0.7478166569050e-01,
5370 0.3038559339780e-07, 0.6231032794494e+01, 0.1256621883632e+02,
5371 0.3137083969782e-07, 0.6207063419190e+01, 0.4292330755499e+01,
5372
5373 0.4024004081854e-07, 0.1195257375713e+01, 0.1334167431096e+02,
5374 0.3300234879283e-07, 0.1804694240998e+01, 0.1057540660594e+02,
5375 0.3635399155575e-07, 0.5597811343500e+01, 0.6208294184755e+01,
5376 0.3032668691356e-07, 0.3191059366530e+01, 0.1805292951336e+02,
5377 0.2809652069058e-07, 0.4094348032570e+01, 0.3523159621801e-02,
5378 0.3696955383823e-07, 0.5219282738794e+01, 0.5966683958112e+01,
5379 0.3562894142503e-07, 0.1037247544554e+01, 0.6357857516136e+01,
5380 0.3510598524148e-07, 0.1430020816116e+01, 0.6599467742779e+01,
5381 0.3617736142953e-07, 0.3002911403677e+01, 0.6019991944201e+01,
5382 0.2624524910730e-07, 0.2437046757292e+01, 0.6702560555334e+01,
5383
5384 0.2535824204490e-07, 0.1581594689647e+01, 0.3141537925223e+02,
5385 0.3519787226257e-07, 0.5379863121521e+01, 0.2505706758577e+03,
5386 0.2578406709982e-07, 0.4904222639329e+01, 0.1673046366289e+02,
5387 0.3423887981473e-07, 0.3646448997315e+01, 0.6546159756691e+01,
5388 0.2776083886467e-07, 0.3307829300144e+01, 0.1272157198369e+02,
5389 0.3379592818379e-07, 0.1747541251125e+01, 0.1494531617769e+02,
5390 0.3050255426284e-07, 0.1784689432607e-01, 0.4732030630302e+01,
5391 0.2652378350236e-07, 0.4420055276260e+01, 0.5863591145557e+01,
5392 0.2374498173768e-07, 0.3629773929208e+01, 0.2388894113936e+01,
5393 0.2716451255140e-07, 0.3079623706780e+01, 0.1202934727411e+02,
5394
5395 0.3038583699229e-07, 0.3312487903507e+00, 0.1256608456547e+02,
5396 0.2220681228760e-07, 0.5265520401774e+01, 0.1336244973887e+02,
5397 0.3044156540912e-07, 0.4766664081250e+01, 0.2908881142201e+02,
5398 0.2731859923561e-07, 0.5069146530691e+01, 0.1391601904066e+02,
5399 0.2285603018171e-07, 0.5954935112271e+01, 0.6076890225335e+01,
5400 0.2025006454555e-07, 0.4061789589267e+01, 0.4701116388778e+01,
5401 0.2012597519804e-07, 0.2485047705241e+01, 0.6262720680387e+01,
5402 0.2003406962258e-07, 0.4163779209320e+01, 0.6303431020504e+01,
5403 0.2207863441371e-07, 0.6923839133828e+00, 0.6489261475556e+01,
5404 0.2481374305624e-07, 0.5944173595676e+01, 0.1204357418345e+02,
5405
5406 0.2130923288870e-07, 0.4641013671967e+01, 0.5746271423666e+01,
5407 0.2446370543391e-07, 0.6125796518757e+01, 0.1495633313810e+00,
5408 0.1932492759052e-07, 0.2234572324504e+00, 0.1352175143971e+02,
5409 0.2600122568049e-07, 0.4281012405440e+01, 0.4590910121555e+01,
5410 0.2431754047488e-07, 0.1429943874870e+00, 0.1162474756779e+01,
5411 0.1875902869209e-07, 0.9781803816948e+00, 0.6279194432410e+01,
5412 0.1874381139426e-07, 0.5670368130173e+01, 0.6286957268481e+01,
5413 0.2156696047173e-07, 0.2008985006833e+01, 0.1813929450232e+02,
5414 0.1965076182484e-07, 0.2566186202453e+00, 0.4686889479442e+01,
5415 0.2334816372359e-07, 0.4408121891493e+01, 0.1002183730415e+02,
5416
5417 0.1869937408802e-07, 0.5272745038656e+01, 0.2427287361862e+00,
5418 0.2436236460883e-07, 0.4407720479029e+01, 0.9514313292143e+02,
5419 0.1761365216611e-07, 0.1943892315074e+00, 0.1351787002167e+02,
5420 0.2156289480503e-07, 0.1418570924545e+01, 0.6037244212485e+01,
5421 0.2164748979255e-07, 0.4724603439430e+01, 0.2301353951334e+02,
5422 0.2222286670853e-07, 0.2400266874598e+01, 0.1266924451345e+02,
5423 0.2070901414929e-07, 0.5230348028732e+01, 0.6528907488406e+01,
5424 0.1792745177020e-07, 0.2099190328945e+01, 0.6819880277225e+01,
5425 0.1841802068445e-07, 0.3467527844848e+00, 0.6514761976723e+02,
5426 0.1578401631718e-07, 0.7098642356340e+00, 0.2077542790660e-01,
5427
5428 0.1561690152531e-07, 0.5943349620372e+01, 0.6272439236156e+01,
5429 0.1558591045463e-07, 0.7040653478980e+00, 0.6293712464735e+01,
5430 0.1737356469576e-07, 0.4487064760345e+01, 0.1765478049437e+02,
5431 0.1434755619991e-07, 0.2993391570995e+01, 0.1102062672231e+00,
5432 0.1482187806654e-07, 0.2278049198251e+01, 0.1052268489556e+01,
5433 0.1424812827089e-07, 0.1682114725827e+01, 0.1311972100268e+02,
5434 0.1380282448623e-07, 0.3262668602579e+01, 0.1017725758696e+02,
5435 0.1811481244566e-07, 0.3187771221777e+01, 0.1887552587463e+02,
5436 0.1504446185696e-07, 0.5650162308647e+01, 0.7626583626240e-01,
5437 0.1740776154137e-07, 0.5487068607507e+01, 0.1965104848470e+02,
5438
5439 0.1374339536251e-07, 0.5745688172201e+01, 0.6016468784579e+01,
5440 0.1761377477704e-07, 0.5748060203659e+01, 0.2593412433514e+02,
5441 0.1535138225795e-07, 0.6226848505790e+01, 0.9411464614024e+01,
5442 0.1788140543676e-07, 0.6189318878563e+01, 0.3301902111895e+02,
5443 0.1375002807996e-07, 0.5371812884394e+01, 0.6327837846670e+00,
5444 0.1242115758632e-07, 0.1471687569712e+01, 0.3894181736510e+01,
5445 0.1450977333938e-07, 0.4143836662127e+01, 0.1277945078067e+02,
5446 0.1297579575023e-07, 0.9003477661957e+00, 0.6549682916313e+01,
5447 0.1462667934821e-07, 0.5760505536428e+01, 0.1863592847156e+02,
5448 0.1381774374799e-07, 0.1085471729463e+01, 0.2379164476796e+01,
5449
5450 0.1682333169307e-07, 0.5409870870133e+01, 0.1620077269078e+02,
5451 0.1190812918837e-07, 0.1397205174601e+01, 0.1149965630200e+02,
5452 0.1221434762106e-07, 0.9001804809095e+00, 0.1257326515556e+02,
5453 0.1549934644860e-07, 0.4262528275544e+01, 0.1820933031200e+02,
5454 0.1252138953050e-07, 0.1411642012027e+01, 0.6993008899458e+01,
5455 0.1237078905387e-07, 0.2844472403615e+01, 0.2435678079171e+02,
5456 0.1446953389615e-07, 0.5295835522223e+01, 0.3813291813120e-01,
5457 0.1388446457170e-07, 0.4969428135497e+01, 0.2458316379602e+00,
5458 0.1019339179228e-07, 0.2491369561806e+01, 0.6112403035119e+01,
5459 0.1258880815343e-07, 0.4679426248976e+01, 0.5429879531333e+01,
5460
5461 0.1297768238261e-07, 0.1074509953328e+01, 0.1249137003520e+02,
5462 0.9913505718094e-08, 0.4735097918224e+01, 0.6247047890016e+01,
5463 0.9830453155969e-08, 0.4158649187338e+01, 0.6453748665772e+01,
5464 0.1192615865309e-07, 0.3438208613699e+01, 0.6290122169689e+01,
5465 0.9835874798277e-08, 0.1913300781229e+01, 0.6319103810876e+01,
5466 0.9639087569277e-08, 0.9487683644125e+00, 0.8273820945392e+01,
5467 0.1175716107001e-07, 0.3228141664287e+01, 0.6276029531202e+01,
5468 0.1018926508678e-07, 0.2216607854300e+01, 0.1254537627298e+02,
5469 0.9500087869225e-08, 0.2625116459733e+01, 0.1256517118505e+02,
5470 0.9664192916575e-08, 0.5860562449214e+01, 0.6259197520765e+01,
5471
5472 0.9612858712203e-08, 0.7885682917381e+00, 0.6306954180126e+01,
5473 0.1117645675413e-07, 0.3932148831189e+01, 0.1779695906178e+02,
5474 0.1158864052160e-07, 0.9995605521691e+00, 0.1778273215245e+02,
5475 0.9021043467028e-08, 0.5263769742673e+01, 0.6172869583223e+01,
5476 0.8836134773563e-08, 0.1496843220365e+01, 0.1692165728891e+01,
5477 0.1045872200691e-07, 0.7009039517214e+00, 0.2204125344462e+00,
5478 0.1211463487798e-07, 0.4041544938511e+01, 0.8257698122054e+02,
5479 0.8541990804094e-08, 0.1447586692316e+01, 0.6393282117669e+01,
5480 0.1038720703636e-07, 0.4594249718112e+00, 0.1550861511662e+02,
5481 0.1126722351445e-07, 0.3925550579036e+01, 0.2061856251104e+00,
5482
5483 0.8697373859631e-08, 0.4411341856037e+01, 0.9491756770005e+00,
5484 0.8869380028441e-08, 0.2402659724813e+01, 0.3903911373650e+01,
5485 0.9247014693258e-08, 0.1401579743423e+01, 0.6267823317922e+01,
5486 0.9205062930950e-08, 0.5245978000814e+01, 0.6298328382969e+01,
5487 0.8000745038049e-08, 0.3590803356945e+01, 0.2648454860559e+01,
5488 0.9168973650819e-08, 0.2470150501679e+01, 0.1498544001348e+03,
5489 0.1075444949238e-07, 0.1328606161230e+01, 0.3694923081589e+02,
5490 0.7817298525817e-08, 0.6162256225998e+01, 0.4804209201333e+01,
5491 0.9541469226356e-08, 0.3942568967039e+01, 0.1256713221673e+02,
5492 0.9821910122027e-08, 0.2360246287233e+00, 0.1140367694411e+02,
5493
5494 0.9897822023777e-08, 0.4619805634280e+01, 0.2280573557157e+02,
5495 0.7737289283765e-08, 0.3784727847451e+01, 0.7834121070590e+01,
5496 0.9260204034710e-08, 0.2223352487601e+01, 0.2787043132925e+01,
5497 0.7320252888486e-08, 0.1288694636874e+01, 0.6282655592598e+01,
5498 0.7319785780946e-08, 0.5359869567774e+01, 0.6283496108294e+01,
5499 0.7147219933778e-08, 0.5516616675856e+01, 0.1725663147538e+02,
5500 0.7946502829878e-08, 0.2630459984567e+01, 0.1241073141809e+02,
5501 0.9001711808932e-08, 0.2849815827227e+01, 0.6281591679874e+01,
5502 0.8994041507257e-08, 0.3795244450750e+01, 0.6284560021018e+01,
5503 0.8298582787358e-08, 0.5236413127363e+00, 0.1241658836951e+02,
5504
5505 0.8526596520710e-08, 0.4794605424426e+01, 0.1098419223922e+02,
5506 0.8209822103197e-08, 0.1578752370328e+01, 0.1096996532989e+02,
5507 0.6357049861094e-08, 0.5708926113761e+01, 0.1596186371003e+01,
5508 0.7370473179049e-08, 0.3842402530241e+01, 0.4061219149443e+01,
5509 0.7232154664726e-08, 0.3067548981535e+01, 0.1610006857377e+03,
5510 0.6328765494903e-08, 0.1313930030069e+01, 0.1193336791622e+02,
5511 0.8030064908595e-08, 0.3488500408886e+01, 0.8460828644453e+00,
5512 0.6275464259232e-08, 0.1532061626198e+01, 0.8531963191132e+00,
5513 0.7051897446325e-08, 0.3285859929993e+01, 0.5849364236221e+01,
5514 0.6161593705428e-08, 0.1477341999464e+01, 0.5573142801433e+01,
5515
5516 0.7754683957278e-08, 0.1586118663096e+01, 0.8662240327241e+01,
5517 0.5889928990701e-08, 0.1304887868803e+01, 0.1232342296471e+02,
5518 0.5705756047075e-08, 0.4555333589350e+01, 0.1258692712880e+02,
5519 0.5964178808332e-08, 0.3001762842062e+01, 0.5333900173445e+01,
5520 0.6712446027467e-08, 0.4886780007595e+01, 0.1171295538178e+02,
5521 0.5941809275464e-08, 0.4701509603824e+01, 0.9779108567966e+01,
5522 0.5466993627395e-08, 0.4588357817278e+01, 0.1884211409667e+02,
5523 0.6340512090980e-08, 0.1164543038893e+01, 0.5217580628120e+02,
5524 0.6325505710045e-08, 0.3919171259645e+01, 0.1041998632314e+02,
5525 0.6164789509685e-08, 0.2143828253542e+01, 0.6151533897323e+01,
5526
5527 0.5263330812430e-08, 0.6066564434241e+01, 0.1885275071096e+02,
5528 0.5597087780221e-08, 0.2926316429472e+01, 0.4337116142245e+00,
5529 0.5396556236817e-08, 0.3244303591505e+01, 0.6286362197481e+01,
5530 0.5396615148223e-08, 0.3404304703662e+01, 0.6279789503410e+01,
5531 0.7091832443341e-08, 0.8532377803192e+00, 0.4907302013889e+01,
5532 0.6572352589782e-08, 0.4901966774419e+01, 0.1176433076753e+02,
5533 0.5960236060795e-08, 0.1874672315797e+01, 0.1422690933580e-01,
5534 0.5125480043511e-08, 0.3735726064334e+01, 0.1245594543367e+02,
5535 0.5928241866410e-08, 0.4502033899935e+01, 0.6414617803568e+01,
5536 0.5249600357424e-08, 0.4372334799878e+01, 0.1151388321134e+02,
5537
5538 0.6059171276087e-08, 0.2581617302908e+01, 0.6062663316000e+01,
5539 0.5295235081662e-08, 0.2974811513158e+01, 0.3496032717521e+01,
5540 0.5820561875933e-08, 0.1796073748244e+00, 0.2838593341516e+00,
5541 0.4754696606440e-08, 0.1981998136973e+01, 0.3104930017775e+01,
5542 0.6385053548955e-08, 0.2559174171605e+00, 0.6133512519065e+01,
5543 0.6589828273941e-08, 0.2750967106776e+01, 0.4087944051283e+02,
5544 0.5383376567189e-08, 0.6325947523578e+00, 0.2248384854122e+02,
5545 0.5928941683538e-08, 0.1672304519067e+01, 0.1581959461667e+01,
5546 0.4816060709794e-08, 0.3512566172575e+01, 0.9388005868221e+01,
5547 0.6003381586512e-08, 0.5610932219189e+01, 0.5326786718777e+01,
5548
5549 0.5504225393105e-08, 0.4037501131256e+01, 0.6503488384892e+01,
5550 0.5353772620129e-08, 0.6122774968240e+01, 0.1735668374386e+03,
5551 0.5786253768544e-08, 0.5527984999515e+01, 0.1350651127443e+00,
5552 0.5065706702002e-08, 0.9980765573624e+00, 0.1248988586463e+02,
5553 0.5972838885276e-08, 0.6044489493203e+01, 0.2673594526851e+02,
5554 0.5323585877961e-08, 0.3924265998147e+01, 0.4171425416666e+01,
5555 0.5210772682858e-08, 0.6220111376901e+01, 0.2460261242967e+02,
5556 0.4726549040535e-08, 0.3716043206862e+01, 0.7232251527446e+01,
5557 0.6029425105059e-08, 0.8548704071116e+00, 0.3227113045244e+03,
5558 0.4481542826513e-08, 0.1426925072829e+01, 0.5547199253223e+01,
5559
5560 0.5836024505068e-08, 0.7135651752625e-01, 0.7285056171570e+02,
5561 0.4137046613272e-08, 0.5330767643283e+01, 0.1087398597200e+02,
5562 0.5171977473924e-08, 0.4494262335353e+00, 0.1884570439172e+02,
5563 0.5694429833732e-08, 0.2952369582215e+01, 0.9723862754494e+02,
5564 0.4009158925298e-08, 0.3500003416535e+01, 0.6244942932314e+01,
5565 0.4784939596873e-08, 0.6196709413181e+01, 0.2929661536378e+02,
5566 0.3983725022610e-08, 0.5103690031897e+01, 0.4274518229222e+01,
5567 0.3870535232462e-08, 0.3187569587401e+01, 0.6321208768577e+01,
5568 0.5140501213951e-08, 0.1668924357457e+01, 0.1232032006293e+02,
5569 0.3849034819355e-08, 0.4445722510309e+01, 0.1726726808967e+02,
5570
5571 0.4002383075060e-08, 0.5226224152423e+01, 0.7018952447668e+01,
5572 0.3890719543549e-08, 0.4371166550274e+01, 0.1491901785440e+02,
5573 0.4887084607881e-08, 0.5973556689693e+01, 0.1478866649112e+01,
5574 0.3739939287592e-08, 0.2089084714600e+01, 0.6922973089781e+01,
5575 0.5031925918209e-08, 0.4658371936827e+01, 0.1715706182245e+02,
5576 0.4387748764954e-08, 0.4825580552819e+01, 0.2331413144044e+03,
5577 0.4147398098865e-08, 0.3739003524998e+01, 0.1376059875786e+02,
5578 0.3719089993586e-08, 0.1148941386536e+01, 0.6297302759782e+01,
5579 0.3934238461056e-08, 0.1559893008343e+01, 0.7872148766781e+01,
5580 0.3672471375622e-08, 0.5516145383612e+01, 0.6268848941110e+01,
5581
5582 0.3768911277583e-08, 0.6116053700563e+01, 0.4157198507331e+01,
5583 0.4033388417295e-08, 0.5076821746017e+01, 0.1567108171867e+02,
5584 0.3764194617832e-08, 0.8164676232075e+00, 0.3185192151914e+01,
5585 0.4840628226284e-08, 0.1360479453671e+01, 0.1252801878276e+02,
5586 0.4949443923785e-08, 0.2725622229926e+01, 0.1617106187867e+03,
5587 0.4117393089971e-08, 0.6054459628492e+00, 0.5642198095270e+01,
5588 0.3925754020428e-08, 0.8570462135210e+00, 0.2139354194808e+02,
5589 0.3630551757923e-08, 0.3552067338279e+01, 0.6294805223347e+01,
5590 0.3627274802357e-08, 0.3096565085313e+01, 0.6271346477544e+01,
5591 0.3806143885093e-08, 0.6367751709777e+00, 0.1725304118033e+02,
5592
5593 0.4433254641565e-08, 0.4848461503937e+01, 0.7445550607224e+01,
5594 0.3712319846576e-08, 0.1331950643655e+01, 0.4194847048887e+00,
5595 0.3849847534783e-08, 0.4958368297746e+00, 0.9562891316684e+00,
5596 0.3483955430165e-08, 0.2237215515707e+01, 0.1161697602389e+02,
5597 0.3961912730982e-08, 0.3332402188575e+01, 0.2277943724828e+02,
5598 0.3419978244481e-08, 0.5785600576016e+01, 0.1362553364512e+02,
5599 0.3329417758177e-08, 0.9812676559709e-01, 0.1685848245639e+02,
5600 0.4207206893193e-08, 0.9494780468236e+00, 0.2986433403208e+02,
5601 0.3268548976410e-08, 0.1739332095686e+00, 0.5749861718712e+01,
5602 0.3321880082685e-08, 0.1423354800666e+01, 0.6279143387820e+01,
5603
5604 0.4503173010852e-08, 0.2314972675293e+00, 0.1385561574497e+01,
5605 0.4316599090954e-08, 0.1012646782616e+00, 0.4176041334900e+01,
5606 0.3283493323850e-08, 0.5233306881265e+01, 0.6287008313071e+01,
5607 0.3164033542343e-08, 0.4005597257511e+01, 0.2099539292909e+02,
5608 0.4159720956725e-08, 0.5365676242020e+01, 0.5905702259363e+01,
5609 0.3565176892217e-08, 0.4284440620612e+01, 0.3932462625300e-02,
5610 0.3514440950221e-08, 0.4270562636575e+01, 0.7335344340001e+01,
5611 0.3540596871909e-08, 0.5953553201060e+01, 0.1234573916645e+02,
5612 0.2960769905118e-08, 0.1115180417718e+01, 0.2670964694522e+02,
5613 0.2962213739684e-08, 0.3863811918186e+01, 0.6408777551755e+00,
5614
5615 0.3883556700251e-08, 0.1268617928302e+01, 0.6660449441528e+01,
5616 0.2919225516346e-08, 0.4908605223265e+01, 0.1375773836557e+01,
5617 0.3115158863370e-08, 0.3744519976885e+01, 0.3802769619140e-01,
5618 0.4099438144212e-08, 0.4173244670532e+01, 0.4480965020977e+02,
5619 0.2899531858964e-08, 0.5910601428850e+01, 0.2059724391010e+02,
5620 0.3289733429855e-08, 0.2488050078239e+01, 0.1081813534213e+02,
5621 0.3933075612875e-08, 0.1122363652883e+01, 0.3773735910827e+00,
5622 0.3021403764467e-08, 0.4951973724904e+01, 0.2982630633589e+02,
5623 0.2798598949757e-08, 0.5117057845513e+01, 0.1937891852345e+02,
5624 0.3397421302707e-08, 0.6104159180476e+01, 0.6923953605621e+01,
5625
5626 0.3720398002179e-08, 0.1184933429829e+01, 0.3066615496545e+02,
5627 0.3598484186267e-08, 0.3505282086105e+01, 0.6147450479709e+01,
5628 0.3694594027310e-08, 0.2286651088141e+01, 0.2636725487657e+01,
5629 0.2680444152969e-08, 0.1871816775482e+00, 0.6816289982179e+01,
5630 0.3497574865641e-08, 0.3143251755431e+01, 0.6418701221183e+01,
5631 0.3130274129494e-08, 0.2462167316018e+01, 0.1235996607578e+02,
5632 0.3241119069551e-08, 0.4256374004686e+01, 0.1652265972112e+02,
5633 0.2601960842061e-08, 0.4970362941425e+01, 0.1045450126711e+02,
5634 0.2690601527504e-08, 0.2372657824898e+01, 0.3163918923335e+00,
5635 0.2908688152664e-08, 0.4232652627721e+01, 0.2828699048865e+02,
5636
5637 0.3120456131875e-08, 0.3925747001137e+00, 0.2195415756911e+02,
5638 0.3148855423384e-08, 0.3093478330445e+01, 0.1172006883645e+02,
5639 0.3051044261017e-08, 0.5560948248212e+01, 0.6055599646783e+01,
5640 0.2826006876660e-08, 0.5072790310072e+01, 0.5120601093667e+01,
5641 0.3100034191711e-08, 0.4998530231096e+01, 0.1799603123222e+02,
5642 0.2398771640101e-08, 0.2561739802176e+01, 0.6255674361143e+01,
5643 0.2384002842728e-08, 0.4087420284111e+01, 0.6310477339748e+01,
5644 0.2842146517568e-08, 0.2515048217955e+01, 0.5469525544182e+01,
5645 0.2847674371340e-08, 0.5235326497443e+01, 0.1034429499989e+02,
5646 0.2903722140764e-08, 0.1088200795797e+01, 0.6510552054109e+01,
5647
5648 0.3187610710605e-08, 0.4710624424816e+01, 0.1693792562116e+03,
5649 0.3048869992813e-08, 0.2857975896445e+00, 0.8390110365991e+01,
5650 0.2860216950984e-08, 0.2241619020815e+01, 0.2243449970715e+00,
5651 0.2701117683113e-08, 0.6651573305272e-01, 0.6129297044991e+01,
5652 0.2509891590152e-08, 0.1285135324585e+01, 0.1044027435778e+02,
5653 0.2623200252223e-08, 0.2981229834530e+00, 0.6436854655901e+01,
5654 0.2622541669202e-08, 0.6122470726189e+01, 0.9380959548977e+01,
5655 0.2818435667099e-08, 0.4251087148947e+01, 0.5934151399930e+01,
5656 0.2365196797465e-08, 0.3465070460790e+01, 0.2470570524223e+02,
5657 0.2358704646143e-08, 0.5791603815350e+01, 0.8671969964381e+01,
5658
5659 0.2388299481390e-08, 0.4142483772941e+01, 0.7096626156709e+01,
5660 0.1996041217224e-08, 0.2101901889496e+01, 0.1727188400790e+02,
5661 0.2687593060336e-08, 0.1526689456959e+01, 0.7075506709219e+02,
5662 0.2618913670810e-08, 0.2397684236095e+01, 0.6632000300961e+01,
5663 0.2571523050364e-08, 0.5751929456787e+00, 0.6206810014183e+01,
5664 0.2582135006946e-08, 0.5595464352926e+01, 0.4873985990671e+02,
5665 0.2372530190361e-08, 0.5092689490655e+01, 0.1590676413561e+02,
5666 0.2357178484712e-08, 0.4444363527851e+01, 0.3097883698531e+01,
5667 0.2451590394723e-08, 0.3108251687661e+01, 0.6612329252343e+00,
5668 0.2370045949608e-08, 0.2608133861079e+01, 0.3459636466239e+02,
5669
5670 0.2268997267358e-08, 0.3639717753384e+01, 0.2844914056730e-01,
5671 0.1731432137906e-08, 0.1741898445707e+00, 0.2019909489111e+02,
5672 0.1629869741622e-08, 0.3902225646724e+01, 0.3035599730800e+02,
5673 0.2206215801974e-08, 0.4971131250731e+01, 0.6281667977667e+01,
5674 0.2205469554680e-08, 0.1677462357110e+01, 0.6284483723224e+01,
5675 0.2148792362509e-08, 0.4236259604006e+01, 0.1980482729015e+02,
5676 0.1873733657847e-08, 0.5926814998687e+01, 0.2876692439167e+02,
5677 0.2026573758959e-08, 0.4349643351962e+01, 0.2449240616245e+02,
5678 0.1807770325110e-08, 0.5700940482701e+01, 0.2045286941806e+02,
5679 0.1881174408581e-08, 0.6601286363430e+00, 0.2358125818164e+02,
5680
5681 0.1368023671690e-08, 0.2211098592752e+01, 0.2473415438279e+02,
5682 0.1720017916280e-08, 0.4942488551129e+01, 0.1679593901136e+03,
5683 0.1702427665131e-08, 0.1452233856386e+01, 0.3338575901272e+03,
5684 0.1414032510054e-08, 0.5525357721439e+01, 0.1624205518357e+03,
5685 0.1652626045364e-08, 0.4108794283624e+01, 0.8956999012000e+02,
5686 0.1642957769686e-08, 0.7344335209984e+00, 0.5267006960365e+02,
5687 0.1614952403624e-08, 0.3541213951363e+01, 0.3332657872986e+02,
5688 0.1535988291188e-08, 0.4031094072151e+01, 0.3852657435933e+02,
5689 0.1593193738177e-08, 0.4185136203609e+01, 0.2282781046519e+03,
5690 0.1074569126382e-08, 0.1720485636868e+01, 0.8397383534231e+02,
5691
5692 0.1074408214509e-08, 0.2758613420318e+01, 0.8401985929482e+02,
5693 0.9700199670465e-09, 0.4216686842097e+01, 0.7826370942180e+02,
5694 0.1258433517061e-08, 0.2575068876639e+00, 0.3115650189215e+03,
5695 0.1240303229539e-08, 0.4800844956756e+00, 0.1784300471910e+03,
5696 0.9018345948127e-09, 0.3896756361552e+00, 0.5886454391678e+02,
5697 0.1135301432805e-08, 0.3700805023550e+00, 0.7842370451713e+02,
5698 0.9215887951370e-09, 0.4364579276638e+01, 0.1014262087719e+03,
5699 0.1055401054147e-08, 0.2156564222111e+01, 0.5660027930059e+02,
5700 0.1008725979831e-08, 0.5454015785234e+01, 0.4245678405627e+02,
5701 0.7217398104321e-09, 0.1597772562175e+01, 0.2457074661053e+03,
5702
5703 0.6912033134447e-09, 0.5824090621461e+01, 0.1679936946371e+03,
5704 0.6833881523549e-09, 0.3578778482835e+01, 0.6053048899753e+02,
5705 0.4887304205142e-09, 0.3724362812423e+01, 0.9656299901946e+02,
5706 0.5173709754788e-09, 0.5422427507933e+01, 0.2442876000072e+03,
5707 0.4671353097145e-09, 0.2396106924439e+01, 0.1435713242844e+03,
5708 0.5652608439480e-09, 0.2804028838685e+01, 0.8365903305582e+02,
5709 0.5604061331253e-09, 0.1638816006247e+01, 0.8433466158131e+02,
5710 0.4712723365400e-09, 0.8979003224474e+00, 0.3164282286739e+03,
5711 0.4909967465112e-09, 0.3210426725516e+01, 0.4059982187939e+03,
5712 0.4771358267658e-09, 0.5308027211629e+01, 0.1805255418145e+03,
5713
5714 0.3943451445989e-09, 0.2195145341074e+01, 0.2568537517081e+03,
5715 0.3952109120244e-09, 0.5081189491586e+01, 0.2449975330562e+03,
5716 0.3788134594789e-09, 0.4345171264441e+01, 0.1568131045107e+03,
5717 0.3738330190479e-09, 0.2613062847997e+01, 0.3948519331910e+03,
5718 0.3099866678136e-09, 0.2846760817689e+01, 0.1547176098872e+03,
5719 0.2002962716768e-09, 0.4921360989412e+01, 0.2268582385539e+03,
5720 0.2198291338754e-09, 0.1130360117454e+00, 0.1658638954901e+03,
5721 0.1491958330784e-09, 0.4228195232278e+01, 0.2219950288015e+03,
5722 0.1475384076173e-09, 0.3005721811604e+00, 0.3052819430710e+03,
5723 0.1661626624624e-09, 0.7830125621203e+00, 0.2526661704812e+03,
5724
5725 0.9015823460025e-10, 0.3807792942715e+01, 0.4171445043968e+03 };
5726
5727 /* Sun-to-Earth, T^0, Y */
5728 static final double e0y[] = {
5729 0.9998921098898e+00, 0.1826583913846e+00, 0.6283075850446e+01,
5730 -0.2442700893735e-01, 0.0000000000000e+00, 0.0000000000000e+00,
5731 0.8352929742915e-02, 0.1395277998680e+00, 0.1256615170089e+02,
5732 0.1046697300177e-03, 0.9641423109763e-01, 0.1884922755134e+02,
5733 0.3110841876663e-04, 0.5381140401712e+01, 0.8399684731857e+02,
5734 0.2570269094593e-04, 0.5301016407128e+01, 0.5296909721118e+00,
5735 0.2147389623610e-04, 0.2662510869850e+01, 0.1577343543434e+01,
5736 0.1680344384050e-04, 0.5207904119704e+01, 0.6279552690824e+01,
5737 0.1679117312193e-04, 0.4582187486968e+01, 0.6286599010068e+01,
5738 0.1440512068440e-04, 0.1900688517726e+01, 0.2352866153506e+01,
5739
5740 0.1135139664999e-04, 0.5273108538556e+01, 0.5223693906222e+01,
5741 0.9345482571018e-05, 0.4503047687738e+01, 0.1203646072878e+02,
5742 0.9007418719568e-05, 0.1605621059637e+01, 0.1021328554739e+02,
5743 0.5671536712314e-05, 0.5812849070861e+00, 0.1059381944224e+01,
5744 0.7451401861666e-05, 0.2807346794836e+01, 0.3981490189893e+00,
5745 0.6393470057114e-05, 0.6029224133855e+01, 0.5753384878334e+01,
5746 0.6814275881697e-05, 0.6472990145974e+00, 0.4705732307012e+01,
5747 0.6113705628887e-05, 0.3813843419700e+01, 0.6812766822558e+01,
5748 0.4503851367273e-05, 0.4527804370996e+01, 0.5884926831456e+01,
5749 0.4522249141926e-05, 0.5991783029224e+01, 0.6256777527156e+01,
5750
5751 0.4501794307018e-05, 0.3798703844397e+01, 0.6309374173736e+01,
5752 0.5514927480180e-05, 0.3961257833388e+01, 0.5507553240374e+01,
5753 0.4062862799995e-05, 0.5256247296369e+01, 0.6681224869435e+01,
5754 0.5414900429712e-05, 0.5499032014097e+01, 0.7755226100720e+00,
5755 0.5463153987424e-05, 0.6173092454097e+01, 0.1414349524433e+02,
5756 0.5071611859329e-05, 0.2870244247651e+01, 0.7860419393880e+01,
5757 0.2195112094455e-05, 0.2952338617201e+01, 0.1150676975667e+02,
5758 0.2279139233919e-05, 0.5951775132933e+01, 0.7058598460518e+01,
5759 0.2278386100876e-05, 0.4845456398785e+01, 0.4694002934110e+01,
5760 0.2559088003308e-05, 0.6945321117311e+00, 0.1216800268190e+02,
5761
5762 0.2561079286856e-05, 0.6167224608301e+01, 0.7099330490126e+00,
5763 0.1792755796387e-05, 0.1400122509632e+01, 0.7962980379786e+00,
5764 0.1818715656502e-05, 0.4703347611830e+01, 0.6283142985870e+01,
5765 0.1818744924791e-05, 0.5086748900237e+01, 0.6283008715021e+01,
5766 0.1554518791390e-05, 0.5331008042713e-01, 0.2513230340178e+02,
5767 0.2063265737239e-05, 0.4283680484178e+01, 0.1179062909082e+02,
5768 0.1497613520041e-05, 0.6074207826073e+01, 0.5486777812467e+01,
5769 0.2000617940427e-05, 0.2501426281450e+01, 0.1778984560711e+02,
5770 0.1289731195580e-05, 0.3646340599536e+01, 0.7079373888424e+01,
5771 0.1282657998934e-05, 0.3232864804902e+01, 0.3738761453707e+01,
5772
5773 0.1528915968658e-05, 0.5581433416669e+01, 0.2132990797783e+00,
5774 0.1187304098432e-05, 0.5453576453694e+01, 0.9437762937313e+01,
5775 0.7842782928118e-06, 0.2823953922273e+00, 0.8827390247185e+01,
5776 0.7352892280868e-06, 0.1124369580175e+01, 0.1589072916335e+01,
5777 0.6570189360797e-06, 0.2089154042840e+01, 0.1176985366291e+02,
5778 0.6324967590410e-06, 0.6704855581230e+00, 0.6262300422539e+01,
5779 0.6298289872283e-06, 0.2836414855840e+01, 0.6303851278352e+01,
5780 0.6476686465855e-06, 0.4852433866467e+00, 0.7113454667900e-02,
5781 0.8587034651234e-06, 0.1453511005668e+01, 0.1672837615881e+03,
5782 0.8068948788113e-06, 0.9224087798609e+00, 0.6069776770667e+01,
5783
5784 0.8353786011661e-06, 0.4631707184895e+01, 0.3340612434717e+01,
5785 0.6009324532132e-06, 0.1829498827726e+01, 0.4136910472696e+01,
5786 0.7558158559566e-06, 0.2588596800317e+01, 0.6496374930224e+01,
5787 0.5809279504503e-06, 0.5516818853476e+00, 0.1097707878456e+02,
5788 0.5374131950254e-06, 0.6275674734960e+01, 0.1194447056968e+01,
5789 0.5711160507326e-06, 0.1091905956872e+01, 0.6282095334605e+01,
5790 0.5710183170746e-06, 0.2415001635090e+01, 0.6284056366286e+01,
5791 0.5144373590610e-06, 0.6020336443438e+01, 0.6290189305114e+01,
5792 0.5103108927267e-06, 0.3775634564605e+01, 0.6275962395778e+01,
5793 0.4960654697891e-06, 0.1073450946756e+01, 0.6127655567643e+01,
5794
5795 0.4786385689280e-06, 0.2431178012310e+01, 0.6438496133249e+01,
5796 0.6109911263665e-06, 0.5343356157914e+01, 0.3154687086868e+01,
5797 0.4839898944024e-06, 0.5830833594047e-01, 0.8018209333619e+00,
5798 0.4734822623919e-06, 0.4536080134821e+01, 0.3128388763578e+01,
5799 0.4834741473290e-06, 0.2585090489754e+00, 0.7084896783808e+01,
5800 0.5134858581156e-06, 0.4213317172603e+01, 0.1235285262111e+02,
5801 0.5064004264978e-06, 0.4814418806478e+00, 0.1185621865188e+02,
5802 0.3753476772761e-06, 0.1599953399788e+01, 0.8429241228195e+01,
5803 0.4935264014283e-06, 0.2157417556873e+01, 0.2544314396739e+01,
5804 0.3950929600897e-06, 0.3359394184254e+01, 0.5481254917084e+01,
5805
5806 0.4895849789777e-06, 0.5165704376558e+01, 0.9225539266174e+01,
5807 0.4215241688886e-06, 0.2065368800993e+01, 0.1726015463500e+02,
5808 0.3796773731132e-06, 0.1468606346612e+01, 0.4265981595566e+00,
5809 0.3114178142515e-06, 0.3615638079474e+01, 0.2146165377750e+01,
5810 0.3260664220838e-06, 0.4417134922435e+01, 0.4164311961999e+01,
5811 0.3976996123008e-06, 0.4700866883004e+01, 0.5856477690889e+01,
5812 0.2801459672924e-06, 0.4538902060922e+01, 0.1256967486051e+02,
5813 0.3638931868861e-06, 0.1334197991475e+01, 0.1807370494127e+02,
5814 0.2487013269476e-06, 0.3749275558275e+01, 0.2629832328990e-01,
5815 0.3034165481994e-06, 0.4236622030873e+00, 0.4535059491685e+01,
5816
5817 0.2676278825586e-06, 0.5970848007811e+01, 0.3930209696940e+01,
5818 0.2764903818918e-06, 0.5194636754501e+01, 0.1256262854127e+02,
5819 0.2485149930507e-06, 0.1002434207846e+01, 0.5088628793478e+01,
5820 0.2199305540941e-06, 0.3066773098403e+01, 0.1255903824622e+02,
5821 0.2571106500435e-06, 0.7588312459063e+00, 0.1336797263425e+02,
5822 0.2049751817158e-06, 0.3444977434856e+01, 0.1137170464392e+02,
5823 0.2599707296297e-06, 0.1873128542205e+01, 0.7143069561767e+02,
5824 0.1785018072217e-06, 0.5015891306615e+01, 0.1748016358760e+01,
5825 0.2324833891115e-06, 0.4618271239730e+01, 0.1831953657923e+02,
5826 0.1709711119545e-06, 0.5300003455669e+01, 0.4933208510675e+01,
5827
5828 0.2107159351716e-06, 0.2229819815115e+01, 0.7477522907414e+01,
5829 0.1750333080295e-06, 0.6161485880008e+01, 0.1044738781244e+02,
5830 0.2000598210339e-06, 0.2967357299999e+01, 0.8031092209206e+01,
5831 0.1380920248681e-06, 0.3027007923917e+01, 0.8635942003952e+01,
5832 0.1412460470299e-06, 0.6037597163798e+01, 0.2942463415728e+01,
5833 0.1888459803001e-06, 0.8561476243374e+00, 0.1561374759853e+03,
5834 0.1788370542585e-06, 0.4869736290209e+01, 0.1592596075957e+01,
5835 0.1360893296167e-06, 0.3626411886436e+01, 0.1309584267300e+02,
5836 0.1506846530160e-06, 0.1550975377427e+01, 0.1649636139783e+02,
5837 0.1800913376176e-06, 0.2075826033190e+01, 0.1729818233119e+02,
5838
5839 0.1436261390649e-06, 0.6148876420255e+01, 0.2042657109477e+02,
5840 0.1220227114151e-06, 0.4382583879906e+01, 0.7632943190217e+01,
5841 0.1337883603592e-06, 0.2036644327361e+01, 0.1213955354133e+02,
5842 0.1159326650738e-06, 0.3892276994687e+01, 0.5331357529664e+01,
5843 0.1352853128569e-06, 0.1447950649744e+01, 0.1673046366289e+02,
5844 0.1433408296083e-06, 0.4457854692961e+01, 0.7342457794669e+01,
5845 0.1234701666518e-06, 0.1538818147151e+01, 0.6279485555400e+01,
5846 0.1234027192007e-06, 0.1968523220760e+01, 0.6286666145492e+01,
5847 0.1244024091797e-06, 0.5779803499985e+01, 0.1511046609763e+02,
5848 0.1097934945516e-06, 0.6210975221388e+00, 0.1098880815746e+02,
5849
5850 0.1254611329856e-06, 0.2591963807998e+01, 0.1572083878776e+02,
5851 0.1158247286784e-06, 0.2483612812670e+01, 0.5729506548653e+01,
5852 0.9039078252960e-07, 0.3857554579796e+01, 0.9623688285163e+01,
5853 0.9108024978836e-07, 0.5826368512984e+01, 0.7234794171227e+01,
5854 0.8887068108436e-07, 0.3475694573987e+01, 0.6148010737701e+01,
5855 0.8632374035438e-07, 0.3059070488983e-01, 0.6418140963190e+01,
5856 0.7893186992967e-07, 0.1583194837728e+01, 0.2118763888447e+01,
5857 0.8297650201172e-07, 0.8519770534637e+00, 0.1471231707864e+02,
5858 0.1019759578988e-06, 0.1319598738732e+00, 0.1349867339771e+01,
5859 0.1010037696236e-06, 0.9937860115618e+00, 0.6836645152238e+01,
5860
5861 0.1047727548266e-06, 0.1382138405399e+01, 0.5999216516294e+01,
5862 0.7351993881086e-07, 0.3833397851735e+01, 0.6040347114260e+01,
5863 0.9868771092341e-07, 0.2124913814390e+01, 0.6566935184597e+01,
5864 0.7007321959390e-07, 0.5946305343763e+01, 0.6525804586632e+01,
5865 0.6861411679709e-07, 0.4574654977089e+01, 0.7238675589263e+01,
5866 0.7554519809614e-07, 0.5949232686844e+01, 0.1253985337760e+02,
5867 0.9541880448335e-07, 0.3495242990564e+01, 0.2122839202813e+02,
5868 0.7185606722155e-07, 0.4310113471661e+01, 0.6245048154254e+01,
5869 0.7131360871710e-07, 0.5480309323650e+01, 0.6321103546637e+01,
5870 0.6651142021039e-07, 0.5411097713654e+01, 0.5327476111629e+01,
5871
5872 0.8538618213667e-07, 0.1827849973951e+01, 0.1101510648075e+02,
5873 0.8634954288044e-07, 0.5443584943349e+01, 0.5643178611111e+01,
5874 0.7449415051484e-07, 0.2011535459060e+01, 0.5368044267797e+00,
5875 0.7421047599169e-07, 0.3464562529249e+01, 0.2354323048545e+02,
5876 0.6140694354424e-07, 0.5657556228815e+01, 0.1296430071988e+02,
5877 0.6353525143033e-07, 0.3463816593821e+01, 0.1990745094947e+01,
5878 0.6221964013447e-07, 0.1532259498697e+01, 0.9517183207817e+00,
5879 0.5852480257244e-07, 0.1375396598875e+01, 0.9555997388169e+00,
5880 0.6398637498911e-07, 0.2405645801972e+01, 0.2407292145756e+02,
5881 0.7039744069878e-07, 0.5397541799027e+01, 0.5225775174439e+00,
5882
5883 0.6977997694382e-07, 0.4762347105419e+01, 0.1097355562493e+02,
5884 0.7460629558396e-07, 0.2711944692164e+01, 0.2200391463820e+02,
5885 0.5376577536101e-07, 0.2352980430239e+01, 0.1431416805965e+02,
5886 0.7530607893556e-07, 0.1943940180699e+01, 0.1842262939178e+02,
5887 0.6822928971605e-07, 0.4337651846959e+01, 0.1554202828031e+00,
5888 0.6220772380094e-07, 0.6716871369278e+00, 0.1845107853235e+02,
5889 0.6586950799043e-07, 0.2229714460505e+01, 0.5216580451554e+01,
5890 0.5873800565771e-07, 0.7627013920580e+00, 0.6398972393349e+00,
5891 0.6264346929745e-07, 0.6202785478961e+00, 0.6277552955062e+01,
5892 0.6257929115669e-07, 0.2886775596668e+01, 0.6288598745829e+01,
5893
5894 0.5343536033409e-07, 0.1977241012051e+01, 0.4690479774488e+01,
5895 0.5587849781714e-07, 0.1922923484825e+01, 0.1551045220144e+01,
5896 0.6905100845603e-07, 0.3570757164631e+01, 0.1030928125552e+00,
5897 0.6178957066649e-07, 0.5197558947765e+01, 0.5230807360890e+01,
5898 0.6187270224331e-07, 0.8193497368922e+00, 0.5650292065779e+01,
5899 0.5385664291426e-07, 0.5406336665586e+01, 0.7771377146812e+02,
5900 0.6329363917926e-07, 0.2837760654536e+01, 0.2608790314060e+02,
5901 0.4546018761604e-07, 0.2933580297050e+01, 0.5535693017924e+00,
5902 0.6196091049375e-07, 0.4157871494377e+01, 0.8467247584405e+02,
5903 0.6159555108218e-07, 0.3211703561703e+01, 0.2394243902548e+03,
5904
5905 0.4995340539317e-07, 0.1459098102922e+01, 0.4732030630302e+01,
5906 0.5457031243572e-07, 0.1430457676136e+01, 0.6179983037890e+01,
5907 0.4863461418397e-07, 0.2196425916730e+01, 0.9027992316901e+02,
5908 0.5342947626870e-07, 0.2086612890268e+01, 0.6386168663001e+01,
5909 0.5674296648439e-07, 0.2760204966535e+01, 0.6915859635113e+01,
5910 0.4745783120161e-07, 0.4245368971862e+01, 0.6282970628506e+01,
5911 0.4745676961198e-07, 0.5544725787016e+01, 0.6283181072386e+01,
5912 0.4049796869973e-07, 0.2213984363586e+01, 0.6254626709878e+01,
5913 0.4248333596940e-07, 0.8075781952896e+00, 0.7875671926403e+01,
5914 0.4027178070205e-07, 0.1293268540378e+01, 0.6311524991013e+01,
5915
5916 0.4066543943476e-07, 0.3986141175804e+01, 0.3634620989887e+01,
5917 0.4858863787880e-07, 0.1276112738231e+01, 0.5760498333002e+01,
5918 0.5277398263530e-07, 0.4916111741527e+01, 0.2515860172507e+02,
5919 0.4105635656559e-07, 0.1725805864426e+01, 0.6709674010002e+01,
5920 0.4376781925772e-07, 0.2243642442106e+01, 0.6805653367890e+01,
5921 0.3235827894693e-07, 0.3614135118271e+01, 0.1066495398892e+01,
5922 0.3073244740308e-07, 0.2460873393460e+01, 0.5863591145557e+01,
5923 0.3088609271373e-07, 0.5678431771790e+01, 0.9917696840332e+01,
5924 0.3393022279836e-07, 0.3814017477291e+01, 0.1391601904066e+02,
5925 0.3038686508802e-07, 0.4660216229171e+01, 0.1256621883632e+02,
5926
5927 0.4019677752497e-07, 0.5906906243735e+01, 0.1334167431096e+02,
5928 0.3288834998232e-07, 0.9536146445882e+00, 0.1620077269078e+02,
5929 0.3889973794631e-07, 0.3942205097644e+01, 0.7478166569050e-01,
5930 0.3050438987141e-07, 0.1624810271286e+01, 0.1805292951336e+02,
5931 0.3601142564638e-07, 0.4030467142575e+01, 0.6208294184755e+01,
5932 0.3689015557141e-07, 0.3648878818694e+01, 0.5966683958112e+01,
5933 0.3563471893565e-07, 0.5749584017096e+01, 0.6357857516136e+01,
5934 0.2776183170667e-07, 0.2630124187070e+01, 0.3523159621801e-02,
5935 0.2922350530341e-07, 0.1790346403629e+01, 0.1272157198369e+02,
5936 0.3511076917302e-07, 0.6142198301611e+01, 0.6599467742779e+01,
5937
5938 0.3619351007632e-07, 0.1432421386492e+01, 0.6019991944201e+01,
5939 0.2561254711098e-07, 0.2302822475792e+01, 0.1259245002418e+02,
5940 0.2626903942920e-07, 0.8660470994571e+00, 0.6702560555334e+01,
5941 0.2550187397083e-07, 0.6069721995383e+01, 0.1057540660594e+02,
5942 0.2535873526138e-07, 0.1079020331795e-01, 0.3141537925223e+02,
5943 0.3519786153847e-07, 0.3809066902283e+01, 0.2505706758577e+03,
5944 0.3424651492873e-07, 0.2075435114417e+01, 0.6546159756691e+01,
5945 0.2372676630861e-07, 0.2057803120154e+01, 0.2388894113936e+01,
5946 0.2710980779541e-07, 0.1510068488010e+01, 0.1202934727411e+02,
5947 0.3038710889704e-07, 0.5043617528901e+01, 0.1256608456547e+02,
5948
5949 0.2220364130585e-07, 0.3694793218205e+01, 0.1336244973887e+02,
5950 0.3025880825460e-07, 0.5450618999049e-01, 0.2908881142201e+02,
5951 0.2784493486864e-07, 0.3381164084502e+01, 0.1494531617769e+02,
5952 0.2294414142438e-07, 0.4382309025210e+01, 0.6076890225335e+01,
5953 0.2012723294724e-07, 0.9142212256518e+00, 0.6262720680387e+01,
5954 0.2036357831958e-07, 0.5676172293154e+01, 0.4701116388778e+01,
5955 0.2003474823288e-07, 0.2592767977625e+01, 0.6303431020504e+01,
5956 0.2207144900109e-07, 0.5404976271180e+01, 0.6489261475556e+01,
5957 0.2481664905135e-07, 0.4373284587027e+01, 0.1204357418345e+02,
5958 0.2674949182295e-07, 0.5859182188482e+01, 0.4590910121555e+01,
5959
5960 0.2450554720322e-07, 0.4555381557451e+01, 0.1495633313810e+00,
5961 0.2601975986457e-07, 0.3933165584959e+01, 0.1965104848470e+02,
5962 0.2199860022848e-07, 0.5227977189087e+01, 0.1351787002167e+02,
5963 0.2448121172316e-07, 0.4858060353949e+01, 0.1162474756779e+01,
5964 0.1876014864049e-07, 0.5690546553605e+01, 0.6279194432410e+01,
5965 0.1874513219396e-07, 0.4099539297446e+01, 0.6286957268481e+01,
5966 0.2156380842559e-07, 0.4382594769913e+00, 0.1813929450232e+02,
5967 0.1981691240061e-07, 0.1829784152444e+01, 0.4686889479442e+01,
5968 0.2329992648539e-07, 0.2836254278973e+01, 0.1002183730415e+02,
5969 0.1765184135302e-07, 0.2803494925833e+01, 0.4292330755499e+01,
5970
5971 0.2436368366085e-07, 0.2836897959677e+01, 0.9514313292143e+02,
5972 0.2164089203889e-07, 0.6127522446024e+01, 0.6037244212485e+01,
5973 0.1847755034221e-07, 0.3683163635008e+01, 0.2427287361862e+00,
5974 0.1674798769966e-07, 0.3316993867246e+00, 0.1311972100268e+02,
5975 0.2222542124356e-07, 0.8294097805480e+00, 0.1266924451345e+02,
5976 0.2071074505925e-07, 0.3659492220261e+01, 0.6528907488406e+01,
5977 0.1608224471835e-07, 0.4774492067182e+01, 0.1352175143971e+02,
5978 0.1857583439071e-07, 0.2873120597682e+01, 0.8662240327241e+01,
5979 0.1793018836159e-07, 0.5282441177929e+00, 0.6819880277225e+01,
5980 0.1575391221692e-07, 0.1320789654258e+01, 0.1102062672231e+00,
5981
5982 0.1840132009557e-07, 0.1917110916256e+01, 0.6514761976723e+02,
5983 0.1760917288281e-07, 0.2972635937132e+01, 0.5746271423666e+01,
5984 0.1561779518516e-07, 0.4372569261981e+01, 0.6272439236156e+01,
5985 0.1558687885205e-07, 0.5416424926425e+01, 0.6293712464735e+01,
5986 0.1951359382579e-07, 0.3094448898752e+01, 0.2301353951334e+02,
5987 0.1569144275614e-07, 0.2802103689808e+01, 0.1765478049437e+02,
5988 0.1479130389462e-07, 0.2136435020467e+01, 0.2077542790660e-01,
5989 0.1467828510764e-07, 0.7072627435674e+00, 0.1052268489556e+01,
5990 0.1627627337440e-07, 0.3947607143237e+01, 0.6327837846670e+00,
5991 0.1503498479758e-07, 0.4079248909190e+01, 0.7626583626240e-01,
5992
5993 0.1297967708237e-07, 0.6269637122840e+01, 0.1149965630200e+02,
5994 0.1374416896634e-07, 0.4175657970702e+01, 0.6016468784579e+01,
5995 0.1783812325219e-07, 0.1476540547560e+01, 0.3301902111895e+02,
5996 0.1525884228756e-07, 0.4653477715241e+01, 0.9411464614024e+01,
5997 0.1451067396763e-07, 0.2573001128225e+01, 0.1277945078067e+02,
5998 0.1297713111950e-07, 0.5612799618771e+01, 0.6549682916313e+01,
5999 0.1462784012820e-07, 0.4189661623870e+01, 0.1863592847156e+02,
6000 0.1384185980007e-07, 0.2656915472196e+01, 0.2379164476796e+01,
6001 0.1221497599801e-07, 0.5612515760138e+01, 0.1257326515556e+02,
6002 0.1560574525896e-07, 0.4783414317919e+01, 0.1887552587463e+02,
6003
6004 0.1544598372036e-07, 0.2694431138063e+01, 0.1820933031200e+02,
6005 0.1531678928696e-07, 0.4105103489666e+01, 0.2593412433514e+02,
6006 0.1349321503795e-07, 0.3082437194015e+00, 0.5120601093667e+01,
6007 0.1252030290917e-07, 0.6124072334087e+01, 0.6993008899458e+01,
6008 0.1459243816687e-07, 0.3733103981697e+01, 0.3813291813120e-01,
6009 0.1226103625262e-07, 0.1267127706817e+01, 0.2435678079171e+02,
6010 0.1019449641504e-07, 0.4367790112269e+01, 0.1725663147538e+02,
6011 0.1380789433607e-07, 0.3387201768700e+01, 0.2458316379602e+00,
6012 0.1019453421658e-07, 0.9204143073737e+00, 0.6112403035119e+01,
6013 0.1297929434405e-07, 0.5786874896426e+01, 0.1249137003520e+02,
6014
6015 0.9912677786097e-08, 0.3164232870746e+01, 0.6247047890016e+01,
6016 0.9829386098599e-08, 0.2586762413351e+01, 0.6453748665772e+01,
6017 0.1226807746104e-07, 0.6239068436607e+01, 0.5429879531333e+01,
6018 0.1192691755997e-07, 0.1867380051424e+01, 0.6290122169689e+01,
6019 0.9836499227081e-08, 0.3424716293727e+00, 0.6319103810876e+01,
6020 0.9642862564285e-08, 0.5661372990657e+01, 0.8273820945392e+01,
6021 0.1165184404862e-07, 0.5768367239093e+01, 0.1778273215245e+02,
6022 0.1175794418818e-07, 0.1657351222943e+01, 0.6276029531202e+01,
6023 0.1018948635601e-07, 0.6458292350865e+00, 0.1254537627298e+02,
6024 0.9500383606676e-08, 0.1054306140741e+01, 0.1256517118505e+02,
6025
6026 0.1227512202906e-07, 0.2505278379114e+01, 0.2248384854122e+02,
6027 0.9664792009993e-08, 0.4289737277000e+01, 0.6259197520765e+01,
6028 0.9613285666331e-08, 0.5500597673141e+01, 0.6306954180126e+01,
6029 0.1117906736211e-07, 0.2361405953468e+01, 0.1779695906178e+02,
6030 0.9611378640782e-08, 0.2851310576269e+01, 0.2061856251104e+00,
6031 0.8845354852370e-08, 0.6208777705343e+01, 0.1692165728891e+01,
6032 0.1054046966600e-07, 0.5413091423934e+01, 0.2204125344462e+00,
6033 0.1215539124483e-07, 0.5613969479755e+01, 0.8257698122054e+02,
6034 0.9932460955209e-08, 0.1106124877015e+01, 0.1017725758696e+02,
6035 0.8785804715043e-08, 0.2869224476477e+01, 0.9491756770005e+00,
6036
6037 0.8538084097562e-08, 0.6159640899344e+01, 0.6393282117669e+01,
6038 0.8648994369529e-08, 0.1374901198784e+01, 0.4804209201333e+01,
6039 0.1039063219067e-07, 0.5171080641327e+01, 0.1550861511662e+02,
6040 0.8867983926439e-08, 0.8317320304902e+00, 0.3903911373650e+01,
6041 0.8327495955244e-08, 0.3605591969180e+01, 0.6172869583223e+01,
6042 0.9243088356133e-08, 0.6114299196843e+01, 0.6267823317922e+01,
6043 0.9205657357835e-08, 0.3675153683737e+01, 0.6298328382969e+01,
6044 0.1033269714606e-07, 0.3313328813024e+01, 0.5573142801433e+01,
6045 0.8001706275552e-08, 0.2019980960053e+01, 0.2648454860559e+01,
6046 0.9171858254191e-08, 0.8992015524177e+00, 0.1498544001348e+03,
6047
6048 0.1075327150242e-07, 0.2898669963648e+01, 0.3694923081589e+02,
6049 0.9884866689828e-08, 0.4946715904478e+01, 0.1140367694411e+02,
6050 0.9541835576677e-08, 0.2371787888469e+01, 0.1256713221673e+02,
6051 0.7739903376237e-08, 0.2213775190612e+01, 0.7834121070590e+01,
6052 0.7311962684106e-08, 0.3429378787739e+01, 0.1192625446156e+02,
6053 0.9724904869624e-08, 0.6195878564404e+01, 0.2280573557157e+02,
6054 0.9251628983612e-08, 0.6511509527390e+00, 0.2787043132925e+01,
6055 0.7320763787842e-08, 0.6001083639421e+01, 0.6282655592598e+01,
6056 0.7320296650962e-08, 0.3789073265087e+01, 0.6283496108294e+01,
6057 0.7947032271039e-08, 0.1059659582204e+01, 0.1241073141809e+02,
6058
6059 0.9005277053115e-08, 0.1280315624361e+01, 0.6281591679874e+01,
6060 0.8995601652048e-08, 0.2224439106766e+01, 0.6284560021018e+01,
6061 0.8288040568796e-08, 0.5234914433867e+01, 0.1241658836951e+02,
6062 0.6359381347255e-08, 0.4137989441490e+01, 0.1596186371003e+01,
6063 0.8699572228626e-08, 0.1758411009497e+01, 0.6133512519065e+01,
6064 0.6456797542736e-08, 0.5919285089994e+01, 0.1685848245639e+02,
6065 0.7424573475452e-08, 0.5414616938827e+01, 0.4061219149443e+01,
6066 0.7235671196168e-08, 0.1496516557134e+01, 0.1610006857377e+03,
6067 0.8104015182733e-08, 0.1919918242764e+01, 0.8460828644453e+00,
6068 0.8098576535937e-08, 0.3819615855458e+01, 0.3894181736510e+01,
6069
6070 0.6275292346625e-08, 0.6244264115141e+01, 0.8531963191132e+00,
6071 0.6052432989112e-08, 0.5037731872610e+00, 0.1567108171867e+02,
6072 0.5705651535817e-08, 0.2984557271995e+01, 0.1258692712880e+02,
6073 0.5789650115138e-08, 0.6087038140697e+01, 0.1193336791622e+02,
6074 0.5512132153377e-08, 0.5855668994076e+01, 0.1232342296471e+02,
6075 0.7388890819102e-08, 0.2443128574740e+01, 0.4907302013889e+01,
6076 0.5467593991798e-08, 0.3017561234194e+01, 0.1884211409667e+02,
6077 0.6388519802999e-08, 0.5887386712935e+01, 0.5217580628120e+02,
6078 0.6106777149944e-08, 0.3483461059895e+00, 0.1422690933580e-01,
6079 0.7383420275489e-08, 0.5417387056707e+01, 0.2358125818164e+02,
6080
6081 0.5505208141738e-08, 0.2848193644783e+01, 0.1151388321134e+02,
6082 0.6310757462877e-08, 0.2349882520828e+01, 0.1041998632314e+02,
6083 0.6166904929691e-08, 0.5728575944077e+00, 0.6151533897323e+01,
6084 0.5263442042754e-08, 0.4495796125937e+01, 0.1885275071096e+02,
6085 0.5591828082629e-08, 0.1355441967677e+01, 0.4337116142245e+00,
6086 0.5397051680497e-08, 0.1673422864307e+01, 0.6286362197481e+01,
6087 0.5396992745159e-08, 0.1833502206373e+01, 0.6279789503410e+01,
6088 0.6572913000726e-08, 0.3331122065824e+01, 0.1176433076753e+02,
6089 0.5123421866413e-08, 0.2165327142679e+01, 0.1245594543367e+02,
6090 0.5930495725999e-08, 0.2931146089284e+01, 0.6414617803568e+01,
6091
6092 0.6431797403933e-08, 0.4134407994088e+01, 0.1350651127443e+00,
6093 0.5003182207604e-08, 0.3805420303749e+01, 0.1096996532989e+02,
6094 0.5587731032504e-08, 0.1082469260599e+01, 0.6062663316000e+01,
6095 0.5935263407816e-08, 0.8384333678401e+00, 0.5326786718777e+01,
6096 0.4756019827760e-08, 0.3552588749309e+01, 0.3104930017775e+01,
6097 0.6599951172637e-08, 0.4320826409528e+01, 0.4087944051283e+02,
6098 0.5902606868464e-08, 0.4811879454445e+01, 0.5849364236221e+01,
6099 0.5921147809031e-08, 0.9942628922396e-01, 0.1581959461667e+01,
6100 0.5505382581266e-08, 0.2466557607764e+01, 0.6503488384892e+01,
6101 0.5353771071862e-08, 0.4551978748683e+01, 0.1735668374386e+03,
6102
6103 0.5063282210946e-08, 0.5710812312425e+01, 0.1248988586463e+02,
6104 0.5926120403383e-08, 0.1333998428358e+01, 0.2673594526851e+02,
6105 0.5211016176149e-08, 0.4649315360760e+01, 0.2460261242967e+02,
6106 0.5347075084894e-08, 0.5512754081205e+01, 0.4171425416666e+01,
6107 0.4872609773574e-08, 0.1308025299938e+01, 0.5333900173445e+01,
6108 0.4727711321420e-08, 0.2144908368062e+01, 0.7232251527446e+01,
6109 0.6029426018652e-08, 0.5567259412084e+01, 0.3227113045244e+03,
6110 0.4321485284369e-08, 0.5230667156451e+01, 0.9388005868221e+01,
6111 0.4476406760553e-08, 0.6134081115303e+01, 0.5547199253223e+01,
6112 0.5835268277420e-08, 0.4783808492071e+01, 0.7285056171570e+02,
6113
6114 0.5172183602748e-08, 0.5161817911099e+01, 0.1884570439172e+02,
6115 0.5693571465184e-08, 0.1381646203111e+01, 0.9723862754494e+02,
6116 0.4060634965349e-08, 0.3876705259495e+00, 0.4274518229222e+01,
6117 0.3967398770473e-08, 0.5029491776223e+01, 0.3496032717521e+01,
6118 0.3943754005255e-08, 0.1923162955490e+01, 0.6244942932314e+01,
6119 0.4781323427824e-08, 0.4633332586423e+01, 0.2929661536378e+02,
6120 0.3871483781204e-08, 0.1616650009743e+01, 0.6321208768577e+01,
6121 0.5141741733997e-08, 0.9817316704659e-01, 0.1232032006293e+02,
6122 0.4002385978497e-08, 0.3656161212139e+01, 0.7018952447668e+01,
6123 0.4901092604097e-08, 0.4404098713092e+01, 0.1478866649112e+01,
6124
6125 0.3740932630345e-08, 0.5181188732639e+00, 0.6922973089781e+01,
6126 0.4387283718538e-08, 0.3254859566869e+01, 0.2331413144044e+03,
6127 0.5019197802033e-08, 0.3086773224677e+01, 0.1715706182245e+02,
6128 0.3834931695175e-08, 0.2797882673542e+01, 0.1491901785440e+02,
6129 0.3760413942497e-08, 0.2892676280217e+01, 0.1726726808967e+02,
6130 0.3719717204628e-08, 0.5861046025739e+01, 0.6297302759782e+01,
6131 0.4145623530149e-08, 0.2168239627033e+01, 0.1376059875786e+02,
6132 0.3932788425380e-08, 0.6271811124181e+01, 0.7872148766781e+01,
6133 0.3686377476857e-08, 0.3936853151404e+01, 0.6268848941110e+01,
6134 0.3779077950339e-08, 0.1404148734043e+01, 0.4157198507331e+01,
6135
6136 0.4091334550598e-08, 0.2452436180854e+01, 0.9779108567966e+01,
6137 0.3926694536146e-08, 0.6102292739040e+01, 0.1098419223922e+02,
6138 0.4841000253289e-08, 0.6072760457276e+01, 0.1252801878276e+02,
6139 0.4949340130240e-08, 0.1154832815171e+01, 0.1617106187867e+03,
6140 0.3761557737360e-08, 0.5527545321897e+01, 0.3185192151914e+01,
6141 0.3647396268188e-08, 0.1525035688629e+01, 0.6271346477544e+01,
6142 0.3932405074189e-08, 0.5570681040569e+01, 0.2139354194808e+02,
6143 0.3631322501141e-08, 0.1981240601160e+01, 0.6294805223347e+01,
6144 0.4130007425139e-08, 0.2050060880201e+01, 0.2195415756911e+02,
6145 0.4433905965176e-08, 0.3277477970321e+01, 0.7445550607224e+01,
6146
6147 0.3851814176947e-08, 0.5210690074886e+01, 0.9562891316684e+00,
6148 0.3485807052785e-08, 0.6653274904611e+00, 0.1161697602389e+02,
6149 0.3979772816991e-08, 0.1767941436148e+01, 0.2277943724828e+02,
6150 0.3402607460500e-08, 0.3421746306465e+01, 0.1087398597200e+02,
6151 0.4049993000926e-08, 0.1127144787547e+01, 0.3163918923335e+00,
6152 0.3420511182382e-08, 0.4214794779161e+01, 0.1362553364512e+02,
6153 0.3640772365012e-08, 0.5324905497687e+01, 0.1725304118033e+02,
6154 0.3323037987501e-08, 0.6135761838271e+01, 0.6279143387820e+01,
6155 0.4503141663637e-08, 0.1802305450666e+01, 0.1385561574497e+01,
6156 0.4314560055588e-08, 0.4812299731574e+01, 0.4176041334900e+01,
6157
6158 0.3294226949110e-08, 0.3657547059723e+01, 0.6287008313071e+01,
6159 0.3215657197281e-08, 0.4866676894425e+01, 0.5749861718712e+01,
6160 0.4129362656266e-08, 0.3809342558906e+01, 0.5905702259363e+01,
6161 0.3137762976388e-08, 0.2494635174443e+01, 0.2099539292909e+02,
6162 0.3514010952384e-08, 0.2699961831678e+01, 0.7335344340001e+01,
6163 0.3327607571530e-08, 0.3318457714816e+01, 0.5436992986000e+01,
6164 0.3541066946675e-08, 0.4382703582466e+01, 0.1234573916645e+02,
6165 0.3216179847052e-08, 0.5271066317054e+01, 0.3802769619140e-01,
6166 0.2959045059570e-08, 0.5819591585302e+01, 0.2670964694522e+02,
6167 0.3884040326665e-08, 0.5980934960428e+01, 0.6660449441528e+01,
6168
6169 0.2922027539886e-08, 0.3337290282483e+01, 0.1375773836557e+01,
6170 0.4110846382042e-08, 0.5742978187327e+01, 0.4480965020977e+02,
6171 0.2934508411032e-08, 0.2278075804200e+01, 0.6408777551755e+00,
6172 0.3966896193000e-08, 0.5835747858477e+01, 0.3773735910827e+00,
6173 0.3286695827610e-08, 0.5838898193902e+01, 0.3932462625300e-02,
6174 0.3720643094196e-08, 0.1122212337858e+01, 0.1646033343740e+02,
6175 0.3285508906174e-08, 0.9182250996416e+00, 0.1081813534213e+02,
6176 0.3753880575973e-08, 0.5174761973266e+01, 0.5642198095270e+01,
6177 0.3022129385587e-08, 0.3381611020639e+01, 0.2982630633589e+02,
6178 0.2798569205621e-08, 0.3546193723922e+01, 0.1937891852345e+02,
6179
6180 0.3397872070505e-08, 0.4533203197934e+01, 0.6923953605621e+01,
6181 0.3708099772977e-08, 0.2756168198616e+01, 0.3066615496545e+02,
6182 0.3599283541510e-08, 0.1934395469918e+01, 0.6147450479709e+01,
6183 0.3688702753059e-08, 0.7149920971109e+00, 0.2636725487657e+01,
6184 0.2681084724003e-08, 0.4899819493154e+01, 0.6816289982179e+01,
6185 0.3495993460759e-08, 0.1572418915115e+01, 0.6418701221183e+01,
6186 0.3130770324995e-08, 0.8912190180489e+00, 0.1235996607578e+02,
6187 0.2744353821941e-08, 0.3800821940055e+01, 0.2059724391010e+02,
6188 0.2842732906341e-08, 0.2644717440029e+01, 0.2828699048865e+02,
6189 0.3046882682154e-08, 0.3987793020179e+01, 0.6055599646783e+01,
6190
6191 0.2399072455143e-08, 0.9908826440764e+00, 0.6255674361143e+01,
6192 0.2384306274204e-08, 0.2516149752220e+01, 0.6310477339748e+01,
6193 0.2977324500559e-08, 0.5849195642118e+01, 0.1652265972112e+02,
6194 0.3062835258972e-08, 0.1681660100162e+01, 0.1172006883645e+02,
6195 0.3109682589231e-08, 0.5804143987737e+00, 0.2751146787858e+02,
6196 0.2903920355299e-08, 0.5800768280123e+01, 0.6510552054109e+01,
6197 0.2823221989212e-08, 0.9241118370216e+00, 0.5469525544182e+01,
6198 0.3187949696649e-08, 0.3139776445735e+01, 0.1693792562116e+03,
6199 0.2922559771655e-08, 0.3549440782984e+01, 0.2630839062450e+00,
6200 0.2436302066603e-08, 0.4735540696319e+01, 0.3946258593675e+00,
6201
6202 0.3049473043606e-08, 0.4998289124561e+01, 0.8390110365991e+01,
6203 0.2863682575784e-08, 0.6709515671102e+00, 0.2243449970715e+00,
6204 0.2641750517966e-08, 0.5410978257284e+01, 0.2986433403208e+02,
6205 0.2704093466243e-08, 0.4778317207821e+01, 0.6129297044991e+01,
6206 0.2445522177011e-08, 0.6009020662222e+01, 0.1171295538178e+02,
6207 0.2623608810230e-08, 0.5010449777147e+01, 0.6436854655901e+01,
6208 0.2079259704053e-08, 0.5980943768809e+01, 0.2019909489111e+02,
6209 0.2820225596771e-08, 0.2679965110468e+01, 0.5934151399930e+01,
6210 0.2365221950927e-08, 0.1894231148810e+01, 0.2470570524223e+02,
6211 0.2359682077149e-08, 0.4220752950780e+01, 0.8671969964381e+01,
6212
6213 0.2387577137206e-08, 0.2571783940617e+01, 0.7096626156709e+01,
6214 0.1982102089816e-08, 0.5169765997119e+00, 0.1727188400790e+02,
6215 0.2687502389925e-08, 0.6239078264579e+01, 0.7075506709219e+02,
6216 0.2207751669135e-08, 0.2031184412677e+01, 0.4377611041777e+01,
6217 0.2618370214274e-08, 0.8266079985979e+00, 0.6632000300961e+01,
6218 0.2591951887361e-08, 0.8819350522008e+00, 0.4873985990671e+02,
6219 0.2375055656248e-08, 0.3520944177789e+01, 0.1590676413561e+02,
6220 0.2472019978911e-08, 0.1551431908671e+01, 0.6612329252343e+00,
6221 0.2368157127199e-08, 0.4178610147412e+01, 0.3459636466239e+02,
6222 0.1764846605693e-08, 0.1506764000157e+01, 0.1980094587212e+02,
6223
6224 0.2291769608798e-08, 0.2118250611782e+01, 0.2844914056730e-01,
6225 0.2209997316943e-08, 0.3363255261678e+01, 0.2666070658668e+00,
6226 0.2292699097923e-08, 0.4200423956460e+00, 0.1484170571900e-02,
6227 0.1629683015329e-08, 0.2331362582487e+01, 0.3035599730800e+02,
6228 0.2206492862426e-08, 0.3400274026992e+01, 0.6281667977667e+01,
6229 0.2205746568257e-08, 0.1066051230724e+00, 0.6284483723224e+01,
6230 0.2026310767991e-08, 0.2779066487979e+01, 0.2449240616245e+02,
6231 0.1762977622163e-08, 0.9951450691840e+00, 0.2045286941806e+02,
6232 0.1368535049606e-08, 0.6402447365817e+00, 0.2473415438279e+02,
6233 0.1720598775450e-08, 0.2303524214705e+00, 0.1679593901136e+03,
6234
6235 0.1702429015449e-08, 0.6164622655048e+01, 0.3338575901272e+03,
6236 0.1414033197685e-08, 0.3954561185580e+01, 0.1624205518357e+03,
6237 0.1573768958043e-08, 0.2028286308984e+01, 0.3144167757552e+02,
6238 0.1650705184447e-08, 0.2304040666128e+01, 0.5267006960365e+02,
6239 0.1651087618855e-08, 0.2538461057280e+01, 0.8956999012000e+02,
6240 0.1616409518983e-08, 0.5111054348152e+01, 0.3332657872986e+02,
6241 0.1537175173581e-08, 0.5601130666603e+01, 0.3852657435933e+02,
6242 0.1593191980553e-08, 0.2614340453411e+01, 0.2282781046519e+03,
6243 0.1499480170643e-08, 0.3624721577264e+01, 0.2823723341956e+02,
6244 0.1493807843235e-08, 0.4214569879008e+01, 0.2876692439167e+02,
6245
6246 0.1074571199328e-08, 0.1496911744704e+00, 0.8397383534231e+02,
6247 0.1074406983417e-08, 0.1187817671922e+01, 0.8401985929482e+02,
6248 0.9757576855851e-09, 0.2655703035858e+01, 0.7826370942180e+02,
6249 0.1258432887565e-08, 0.4969896184844e+01, 0.3115650189215e+03,
6250 0.1240336343282e-08, 0.5192460776926e+01, 0.1784300471910e+03,
6251 0.9016107005164e-09, 0.1960356923057e+01, 0.5886454391678e+02,
6252 0.1135392360918e-08, 0.5082427809068e+01, 0.7842370451713e+02,
6253 0.9216046089565e-09, 0.2793775037273e+01, 0.1014262087719e+03,
6254 0.1061276615030e-08, 0.3726144311409e+01, 0.5660027930059e+02,
6255 0.1010110596263e-08, 0.7404080708937e+00, 0.4245678405627e+02,
6256
6257 0.7217424756199e-09, 0.2697449980577e-01, 0.2457074661053e+03,
6258 0.6912003846756e-09, 0.4253296276335e+01, 0.1679936946371e+03,
6259 0.6871814664847e-09, 0.5148072412354e+01, 0.6053048899753e+02,
6260 0.4887158016343e-09, 0.2153581148294e+01, 0.9656299901946e+02,
6261 0.5161802866314e-09, 0.3852750634351e+01, 0.2442876000072e+03,
6262 0.5652599559057e-09, 0.1233233356270e+01, 0.8365903305582e+02,
6263 0.4710812608586e-09, 0.5610486976767e+01, 0.3164282286739e+03,
6264 0.4909977500324e-09, 0.1639629524123e+01, 0.4059982187939e+03,
6265 0.4772641839378e-09, 0.3737100368583e+01, 0.1805255418145e+03,
6266 0.4487562567153e-09, 0.1158417054478e+00, 0.8433466158131e+02,
6267
6268 0.3943441230497e-09, 0.6243502862796e+00, 0.2568537517081e+03,
6269 0.3952236913598e-09, 0.3510377382385e+01, 0.2449975330562e+03,
6270 0.3788898363417e-09, 0.5916128302299e+01, 0.1568131045107e+03,
6271 0.3738329328831e-09, 0.1042266763456e+01, 0.3948519331910e+03,
6272 0.2451199165151e-09, 0.1166788435700e+01, 0.1435713242844e+03,
6273 0.2436734402904e-09, 0.3254726114901e+01, 0.2268582385539e+03,
6274 0.2213605274325e-09, 0.1687210598530e+01, 0.1658638954901e+03,
6275 0.1491521204829e-09, 0.2657541786794e+01, 0.2219950288015e+03,
6276 0.1474995329744e-09, 0.5013089805819e+01, 0.3052819430710e+03,
6277 0.1661939475656e-09, 0.5495315428418e+01, 0.2526661704812e+03,
6278
6279 0.9015946748003e-10, 0.2236989966505e+01, 0.4171445043968e+03 };
6280
6281 /* Sun-to-Earth, T^0, Z */
6282 static final double e0z[] = {
6283 0.2796207639075e-05, 0.3198701560209e+01, 0.8433466158131e+02,
6284 0.1016042198142e-05, 0.5422360395913e+01, 0.5507553240374e+01,
6285 0.8044305033647e-06, 0.3880222866652e+01, 0.5223693906222e+01,
6286 0.4385347909274e-06, 0.3704369937468e+01, 0.2352866153506e+01,
6287 0.3186156414906e-06, 0.3999639363235e+01, 0.1577343543434e+01,
6288 0.2272412285792e-06, 0.3984738315952e+01, 0.1047747311755e+01,
6289 0.1645620103007e-06, 0.3565412516841e+01, 0.5856477690889e+01,
6290 0.1815836921166e-06, 0.4984507059020e+01, 0.6283075850446e+01,
6291 0.1447461676364e-06, 0.3702753570108e+01, 0.9437762937313e+01,
6292 0.1430760876382e-06, 0.3409658712357e+01, 0.1021328554739e+02,
6293
6294 0.1120445753226e-06, 0.4829561570246e+01, 0.1414349524433e+02,
6295 0.1090232840797e-06, 0.2080729178066e+01, 0.6812766822558e+01,
6296 0.9715727346551e-07, 0.3476295881948e+01, 0.4694002934110e+01,
6297 0.1036267136217e-06, 0.4056639536648e+01, 0.7109288135493e+02,
6298 0.8752665271340e-07, 0.4448159519911e+01, 0.5753384878334e+01,
6299 0.8331864956004e-07, 0.4991704044208e+01, 0.7084896783808e+01,
6300 0.6901658670245e-07, 0.4325358994219e+01, 0.6275962395778e+01,
6301 0.9144536848998e-07, 0.1141826375363e+01, 0.6620890113188e+01,
6302 0.7205085037435e-07, 0.3624344170143e+01, 0.5296909721118e+00,
6303 0.7697874654176e-07, 0.5554257458998e+01, 0.1676215758509e+03,
6304
6305 0.5197545738384e-07, 0.6251760961735e+01, 0.1807370494127e+02,
6306 0.5031345378608e-07, 0.2497341091913e+01, 0.4705732307012e+01,
6307 0.4527110205840e-07, 0.2335079920992e+01, 0.6309374173736e+01,
6308 0.4753355798089e-07, 0.7094148987474e+00, 0.5884926831456e+01,
6309 0.4296951977516e-07, 0.1101916352091e+01, 0.6681224869435e+01,
6310 0.3855341568387e-07, 0.1825495405486e+01, 0.5486777812467e+01,
6311 0.5253930970990e-07, 0.4424740687208e+01, 0.7860419393880e+01,
6312 0.4024630496471e-07, 0.5120498157053e+01, 0.1336797263425e+02,
6313 0.4061069791453e-07, 0.6029771435451e+01, 0.3930209696940e+01,
6314 0.3797883804205e-07, 0.4435193600836e+00, 0.3154687086868e+01,
6315
6316 0.2933033225587e-07, 0.5124157356507e+01, 0.1059381944224e+01,
6317 0.3503000930426e-07, 0.5421830162065e+01, 0.6069776770667e+01,
6318 0.3670096214050e-07, 0.4582101667297e+01, 0.1219403291462e+02,
6319 0.2905609437008e-07, 0.1926566420072e+01, 0.1097707878456e+02,
6320 0.2466827821713e-07, 0.6090174539834e+00, 0.6496374930224e+01,
6321 0.2691647295332e-07, 0.1393432595077e+01, 0.2200391463820e+02,
6322 0.2150554667946e-07, 0.4308671715951e+01, 0.5643178611111e+01,
6323 0.2237481922680e-07, 0.8133968269414e+00, 0.8635942003952e+01,
6324 0.1817741038157e-07, 0.3755205127454e+01, 0.3340612434717e+01,
6325 0.2227820762132e-07, 0.2759558596664e+01, 0.1203646072878e+02,
6326
6327 0.1944713772307e-07, 0.5699645869121e+01, 0.1179062909082e+02,
6328 0.1527340520662e-07, 0.1986749091746e+01, 0.3981490189893e+00,
6329 0.1577282574914e-07, 0.3205017217983e+01, 0.5088628793478e+01,
6330 0.1424738825424e-07, 0.6256747903666e+01, 0.2544314396739e+01,
6331 0.1616563121701e-07, 0.2601671259394e+00, 0.1729818233119e+02,
6332 0.1401210391692e-07, 0.4686939173506e+01, 0.7058598460518e+01,
6333 0.1488726974214e-07, 0.2815862451372e+01, 0.2593412433514e+02,
6334 0.1692626442388e-07, 0.4956894109797e+01, 0.1564752902480e+03,
6335 0.1123571582910e-07, 0.2381192697696e+01, 0.3738761453707e+01,
6336 0.9903308606317e-08, 0.4294851657684e+01, 0.9225539266174e+01,
6337
6338 0.9174533187191e-08, 0.3075171510642e+01, 0.4164311961999e+01,
6339 0.8645985631457e-08, 0.5477534821633e+00, 0.8429241228195e+01,
6340 -0.1085876492688e-07, 0.0000000000000e+00, 0.0000000000000e+00,
6341 0.9264309077815e-08, 0.5968571670097e+01, 0.7079373888424e+01,
6342 0.8243116984954e-08, 0.1489098777643e+01, 0.1044738781244e+02,
6343 0.8268102113708e-08, 0.3512977691983e+01, 0.1150676975667e+02,
6344 0.9043613988227e-08, 0.1290704408221e+00, 0.1101510648075e+02,
6345 0.7432912038789e-08, 0.1991086893337e+01, 0.2608790314060e+02,
6346 0.8586233727285e-08, 0.4238357924414e+01, 0.2986433403208e+02,
6347 0.7612230060131e-08, 0.2911090150166e+01, 0.4732030630302e+01,
6348
6349 0.7097787751408e-08, 0.1908938392390e+01, 0.8031092209206e+01,
6350 0.7640237040175e-08, 0.6129219000168e+00, 0.7962980379786e+00,
6351 0.7070445688081e-08, 0.1380417036651e+01, 0.2146165377750e+01,
6352 0.7690770957702e-08, 0.1680504249084e+01, 0.2122839202813e+02,
6353 0.8051292542594e-08, 0.5127423484511e+01, 0.2942463415728e+01,
6354 0.5902709104515e-08, 0.2020274190917e+01, 0.7755226100720e+00,
6355 0.5134567496462e-08, 0.2606778676418e+01, 0.1256615170089e+02,
6356 0.5525802046102e-08, 0.1613011769663e+01, 0.8018209333619e+00,
6357 0.5880724784221e-08, 0.4604483417236e+01, 0.4690479774488e+01,
6358 0.5211699081370e-08, 0.5718964114193e+01, 0.8827390247185e+01,
6359
6360 0.4891849573562e-08, 0.3689658932196e+01, 0.2132990797783e+00,
6361 0.5150246069997e-08, 0.4099769855122e+01, 0.6480980550449e+02,
6362 0.5102434319633e-08, 0.5660834602509e+01, 0.3379454372902e+02,
6363 0.5083405254252e-08, 0.9842221218974e+00, 0.4136910472696e+01,
6364 0.4206562585682e-08, 0.1341363634163e+00, 0.3128388763578e+01,
6365 0.4663249683579e-08, 0.8130132735866e+00, 0.5216580451554e+01,
6366 0.4099474416530e-08, 0.5791497770644e+01, 0.4265981595566e+00,
6367 0.4628251220767e-08, 0.1249802769331e+01, 0.1572083878776e+02,
6368 0.5024068728142e-08, 0.4795684802743e+01, 0.6290189305114e+01,
6369 0.5120234327758e-08, 0.3810420387208e+01, 0.5230807360890e+01,
6370
6371 0.5524029815280e-08, 0.1029264714351e+01, 0.2397622045175e+03,
6372 0.4757415718860e-08, 0.3528044781779e+01, 0.1649636139783e+02,
6373 0.3915786131127e-08, 0.5593889282646e+01, 0.1589072916335e+01,
6374 0.4869053149991e-08, 0.3299636454433e+01, 0.7632943190217e+01,
6375 0.3649365703729e-08, 0.1286049002584e+01, 0.6206810014183e+01,
6376 0.3992493949002e-08, 0.3100307589464e+01, 0.2515860172507e+02,
6377 0.3320247477418e-08, 0.6212683940807e+01, 0.1216800268190e+02,
6378 0.3287123739696e-08, 0.4699118445928e+01, 0.7234794171227e+01,
6379 0.3472776811103e-08, 0.2630507142004e+01, 0.7342457794669e+01,
6380 0.3423253294767e-08, 0.2946432844305e+01, 0.9623688285163e+01,
6381
6382 0.3896173898244e-08, 0.1224834179264e+01, 0.6438496133249e+01,
6383 0.3388455337924e-08, 0.1543807616351e+01, 0.1494531617769e+02,
6384 0.3062704716523e-08, 0.1191777572310e+01, 0.8662240327241e+01,
6385 0.3270075600400e-08, 0.5483498767737e+01, 0.1194447056968e+01,
6386 0.3101209215259e-08, 0.8000833804348e+00, 0.3772475342596e+02,
6387 0.2780883347311e-08, 0.4077980721888e+00, 0.5863591145557e+01,
6388 0.2903605931824e-08, 0.2617490302147e+01, 0.1965104848470e+02,
6389 0.2682014743119e-08, 0.2634703158290e+01, 0.7238675589263e+01,
6390 0.2534360108492e-08, 0.6102446114873e+01, 0.6836645152238e+01,
6391 0.2392564882509e-08, 0.3681820208691e+01, 0.5849364236221e+01,
6392
6393 0.2656667254856e-08, 0.6216045388886e+01, 0.6133512519065e+01,
6394 0.2331242096773e-08, 0.5864949777744e+01, 0.4535059491685e+01,
6395 0.2287898363668e-08, 0.4566628532802e+01, 0.7477522907414e+01,
6396 0.2336944521306e-08, 0.2442722126930e+01, 0.1137170464392e+02,
6397 0.3156632236269e-08, 0.1626628050682e+01, 0.2509084901204e+03,
6398 0.2982612402766e-08, 0.2803604512609e+01, 0.1748016358760e+01,
6399 0.2774031674807e-08, 0.4654002897158e+01, 0.8223916695780e+02,
6400 0.2295236548638e-08, 0.4326518333253e+01, 0.3378142627421e+00,
6401 0.2190714699873e-08, 0.4519614578328e+01, 0.2908881142201e+02,
6402 0.2191495845045e-08, 0.3012626912549e+01, 0.1673046366289e+02,
6403
6404 0.2492901628386e-08, 0.1290101424052e+00, 0.1543797956245e+03,
6405 0.1993778064319e-08, 0.3864046799414e+01, 0.1778984560711e+02,
6406 0.1898146479022e-08, 0.5053777235891e+01, 0.2042657109477e+02,
6407 0.1918280127634e-08, 0.2222470192548e+01, 0.4165496312290e+02,
6408 0.1916351061607e-08, 0.8719067257774e+00, 0.7737595720538e+02,
6409 0.1834720181466e-08, 0.4031491098040e+01, 0.2358125818164e+02,
6410 0.1249201523806e-08, 0.5938379466835e+01, 0.3301902111895e+02,
6411 0.1477304050539e-08, 0.6544722606797e+00, 0.9548094718417e+02,
6412 0.1264316431249e-08, 0.2059072853236e+01, 0.8399684731857e+02,
6413 0.1203526495039e-08, 0.3644813532605e+01, 0.4558517281984e+02,
6414
6415 0.9221681059831e-09, 0.3241815055602e+01, 0.7805158573086e+02,
6416 0.7849278367646e-09, 0.5043812342457e+01, 0.5217580628120e+02,
6417 0.7983392077387e-09, 0.5000024502753e+01, 0.1501922143975e+03,
6418 0.7925395431654e-09, 0.1398734871821e-01, 0.9061773743175e+02,
6419 0.7640473285886e-09, 0.5067111723130e+01, 0.4951538251678e+02,
6420 0.5398937754482e-09, 0.5597382200075e+01, 0.1613385000004e+03,
6421 0.5626247550193e-09, 0.2601338209422e+01, 0.7318837597844e+02,
6422 0.5525197197855e-09, 0.5814832109256e+01, 0.1432335100216e+03,
6423 0.5407629837898e-09, 0.3384820609076e+01, 0.3230491187871e+03,
6424 0.3856739119801e-09, 0.1072391840473e+01, 0.2334791286671e+03,
6425
6426 0.3856425239987e-09, 0.2369540393327e+01, 0.1739046517013e+03,
6427 0.4350867755983e-09, 0.5255575751082e+01, 0.1620484330494e+03,
6428 0.3844113924996e-09, 0.5482356246182e+01, 0.9757644180768e+02,
6429 0.2854869155431e-09, 0.9573634763143e+00, 0.1697170704744e+03,
6430 0.1719227671416e-09, 0.1887203025202e+01, 0.2265204242912e+03,
6431 0.1527846879755e-09, 0.3982183931157e+01, 0.3341954043900e+03,
6432 0.1128229264847e-09, 0.2787457156298e+01, 0.3119028331842e+03 };
6433
6434 /* Sun-to-Earth, T^1, X */
6435 static final double e1x[] = {
6436 0.1234046326004e-05, 0.0000000000000e+00, 0.0000000000000e+00,
6437 0.5150068824701e-06, 0.6002664557501e+01, 0.1256615170089e+02,
6438 0.1290743923245e-07, 0.5959437664199e+01, 0.1884922755134e+02,
6439 0.1068615564952e-07, 0.2015529654209e+01, 0.6283075850446e+01,
6440 0.2079619142538e-08, 0.1732960531432e+01, 0.6279552690824e+01,
6441 0.2078009243969e-08, 0.4915604476996e+01, 0.6286599010068e+01,
6442 0.6206330058856e-09, 0.3616457953824e+00, 0.4705732307012e+01,
6443 0.5989335313746e-09, 0.3802607304474e+01, 0.6256777527156e+01,
6444 0.5958495663840e-09, 0.2845866560031e+01, 0.6309374173736e+01,
6445 0.4866923261539e-09, 0.5213203771824e+01, 0.7755226100720e+00,
6446
6447 0.4267785823142e-09, 0.4368189727818e+00, 0.1059381944224e+01,
6448 0.4610675141648e-09, 0.1837249181372e-01, 0.7860419393880e+01,
6449 0.3626989993973e-09, 0.2161590545326e+01, 0.5753384878334e+01,
6450 0.3563071194389e-09, 0.1452631954746e+01, 0.5884926831456e+01,
6451 0.3557015642807e-09, 0.4470593393054e+01, 0.6812766822558e+01,
6452 0.3210412089122e-09, 0.5195926078314e+01, 0.6681224869435e+01,
6453 0.2875473577986e-09, 0.5916256610193e+01, 0.2513230340178e+02,
6454 0.2842913681629e-09, 0.1149902426047e+01, 0.6127655567643e+01,
6455 0.2751248215916e-09, 0.5502088574662e+01, 0.6438496133249e+01,
6456 0.2481432881127e-09, 0.2921989846637e+01, 0.5486777812467e+01,
6457
6458 0.2059885976560e-09, 0.3718070376585e+01, 0.7079373888424e+01,
6459 0.2015522342591e-09, 0.5979395259740e+01, 0.6290189305114e+01,
6460 0.1995364084253e-09, 0.6772087985494e+00, 0.6275962395778e+01,
6461 0.1957436436943e-09, 0.2899210654665e+01, 0.5507553240374e+01,
6462 0.1651609818948e-09, 0.6228206482192e+01, 0.1150676975667e+02,
6463 0.1822980550699e-09, 0.1469348746179e+01, 0.1179062909082e+02,
6464 0.1675223159760e-09, 0.3813910555688e+01, 0.7058598460518e+01,
6465 0.1706491764745e-09, 0.3004380506684e+00, 0.7113454667900e-02,
6466 0.1392952362615e-09, 0.1440393973406e+01, 0.7962980379786e+00,
6467 0.1209868266342e-09, 0.4150425791727e+01, 0.4694002934110e+01,
6468
6469 0.1009827202611e-09, 0.3290040429843e+01, 0.3738761453707e+01,
6470 0.1047261388602e-09, 0.4229590090227e+01, 0.6282095334605e+01,
6471 0.1047006652004e-09, 0.2418967680575e+01, 0.6284056366286e+01,
6472 0.9609993143095e-10, 0.4627943659201e+01, 0.6069776770667e+01,
6473 0.9590900593873e-10, 0.1894393939924e+01, 0.4136910472696e+01,
6474 0.9146249188071e-10, 0.2010647519562e+01, 0.6496374930224e+01,
6475 0.8545274480290e-10, 0.5529846956226e-01, 0.1194447056968e+01,
6476 0.8224377881194e-10, 0.1254304102174e+01, 0.1589072916335e+01,
6477 0.6183529510410e-10, 0.3360862168815e+01, 0.8827390247185e+01,
6478 0.6259255147141e-10, 0.4755628243179e+01, 0.8429241228195e+01,
6479
6480 0.5539291694151e-10, 0.5371746955142e+01, 0.4933208510675e+01,
6481 0.7328259466314e-10, 0.4927699613906e+00, 0.4535059491685e+01,
6482 0.6017835843560e-10, 0.5776682001734e-01, 0.1255903824622e+02,
6483 0.7079827775243e-10, 0.4395059432251e+01, 0.5088628793478e+01,
6484 0.5170358878213e-10, 0.5154062619954e+01, 0.1176985366291e+02,
6485 0.4872301838682e-10, 0.6289611648973e+00, 0.6040347114260e+01,
6486 0.5249869411058e-10, 0.5617272046949e+01, 0.3154687086868e+01,
6487 0.4716172354411e-10, 0.3965901800877e+01, 0.5331357529664e+01,
6488 0.4871214940964e-10, 0.4627507050093e+01, 0.1256967486051e+02,
6489 0.4598076850751e-10, 0.6023631226459e+01, 0.6525804586632e+01,
6490
6491 0.4562196089485e-10, 0.4138562084068e+01, 0.3930209696940e+01,
6492 0.4325493872224e-10, 0.1330845906564e+01, 0.7632943190217e+01,
6493 0.5673781176748e-10, 0.2558752615657e+01, 0.5729506548653e+01,
6494 0.3961436642503e-10, 0.2728071734630e+01, 0.7234794171227e+01,
6495 0.5101868209058e-10, 0.4113444965144e+01, 0.6836645152238e+01,
6496 0.5257043167676e-10, 0.6195089830590e+01, 0.8031092209206e+01,
6497 0.5076613989393e-10, 0.2305124132918e+01, 0.7477522907414e+01,
6498 0.3342169352778e-10, 0.5415998155071e+01, 0.1097707878456e+02,
6499 0.3545881983591e-10, 0.3727160564574e+01, 0.4164311961999e+01,
6500 0.3364063738599e-10, 0.2901121049204e+00, 0.1137170464392e+02,
6501
6502 0.3357039670776e-10, 0.1652229354331e+01, 0.5223693906222e+01,
6503 0.4307412268687e-10, 0.4938909587445e+01, 0.1592596075957e+01,
6504 0.3405769115435e-10, 0.2408890766511e+01, 0.3128388763578e+01,
6505 0.3001926198480e-10, 0.4862239006386e+01, 0.1748016358760e+01,
6506 0.2778264787325e-10, 0.5241168661353e+01, 0.7342457794669e+01,
6507 0.2676159480666e-10, 0.3423593942199e+01, 0.2146165377750e+01,
6508 0.2954273399939e-10, 0.1881721265406e+01, 0.5368044267797e+00,
6509 0.3309362888795e-10, 0.1931525677349e+01, 0.8018209333619e+00,
6510 0.2810283608438e-10, 0.2414659495050e+01, 0.5225775174439e+00,
6511 0.3378045637764e-10, 0.4238019163430e+01, 0.1554202828031e+00,
6512
6513 0.2558134979840e-10, 0.1828225235805e+01, 0.5230807360890e+01,
6514 0.2273755578447e-10, 0.5858184283998e+01, 0.7084896783808e+01,
6515 0.2294176037690e-10, 0.4514589779057e+01, 0.1726015463500e+02,
6516 0.2533506099435e-10, 0.2355717851551e+01, 0.5216580451554e+01,
6517 0.2716685375812e-10, 0.2221003625100e+01, 0.8635942003952e+01,
6518 0.2419043435198e-10, 0.5955704951635e+01, 0.4690479774488e+01,
6519 0.2521232544812e-10, 0.1395676848521e+01, 0.5481254917084e+01,
6520 0.2630195021491e-10, 0.5727468918743e+01, 0.2629832328990e-01,
6521 0.2548395840944e-10, 0.2628351859400e-03, 0.1349867339771e+01 };
6522
6523 /* Sun-to-Earth, T^1, Y */
6524 static final double e1y[] = {
6525 0.9304690546528e-06, 0.0000000000000e+00, 0.0000000000000e+00,
6526 0.5150715570663e-06, 0.4431807116294e+01, 0.1256615170089e+02,
6527 0.1290825411056e-07, 0.4388610039678e+01, 0.1884922755134e+02,
6528 0.4645466665386e-08, 0.5827263376034e+01, 0.6283075850446e+01,
6529 0.2079625310718e-08, 0.1621698662282e+00, 0.6279552690824e+01,
6530 0.2078189850907e-08, 0.3344713435140e+01, 0.6286599010068e+01,
6531 0.6207190138027e-09, 0.5074049319576e+01, 0.4705732307012e+01,
6532 0.5989826532569e-09, 0.2231842216620e+01, 0.6256777527156e+01,
6533 0.5961360812618e-09, 0.1274975769045e+01, 0.6309374173736e+01,
6534 0.4874165471016e-09, 0.3642277426779e+01, 0.7755226100720e+00,
6535
6536 0.4283834034360e-09, 0.5148765510106e+01, 0.1059381944224e+01,
6537 0.4652389287529e-09, 0.4715794792175e+01, 0.7860419393880e+01,
6538 0.3751707476401e-09, 0.6617207370325e+00, 0.5753384878334e+01,
6539 0.3559998806198e-09, 0.6155548875404e+01, 0.5884926831456e+01,
6540 0.3558447558857e-09, 0.2898827297664e+01, 0.6812766822558e+01,
6541 0.3211116927106e-09, 0.3625813502509e+01, 0.6681224869435e+01,
6542 0.2875609914672e-09, 0.4345435813134e+01, 0.2513230340178e+02,
6543 0.2843109704069e-09, 0.5862263940038e+01, 0.6127655567643e+01,
6544 0.2744676468427e-09, 0.3926419475089e+01, 0.6438496133249e+01,
6545 0.2481285237789e-09, 0.1351976572828e+01, 0.5486777812467e+01,
6546
6547 0.2060338481033e-09, 0.2147556998591e+01, 0.7079373888424e+01,
6548 0.2015822358331e-09, 0.4408358972216e+01, 0.6290189305114e+01,
6549 0.2001195944195e-09, 0.5385829822531e+01, 0.6275962395778e+01,
6550 0.1953667642377e-09, 0.1304933746120e+01, 0.5507553240374e+01,
6551 0.1839744078713e-09, 0.6173567228835e+01, 0.1179062909082e+02,
6552 0.1643334294845e-09, 0.4635942997523e+01, 0.1150676975667e+02,
6553 0.1768051018652e-09, 0.5086283558874e+01, 0.7113454667900e-02,
6554 0.1674874205489e-09, 0.2243332137241e+01, 0.7058598460518e+01,
6555 0.1421445397609e-09, 0.6186899771515e+01, 0.7962980379786e+00,
6556 0.1255163958267e-09, 0.5730238465658e+01, 0.4694002934110e+01,
6557
6558 0.1013945281961e-09, 0.1726055228402e+01, 0.3738761453707e+01,
6559 0.1047294335852e-09, 0.2658801228129e+01, 0.6282095334605e+01,
6560 0.1047103879392e-09, 0.8481047835035e+00, 0.6284056366286e+01,
6561 0.9530343962826e-10, 0.3079267149859e+01, 0.6069776770667e+01,
6562 0.9604637611690e-10, 0.3258679792918e+00, 0.4136910472696e+01,
6563 0.9153518537177e-10, 0.4398599886584e+00, 0.6496374930224e+01,
6564 0.8562458214922e-10, 0.4772686794145e+01, 0.1194447056968e+01,
6565 0.8232525360654e-10, 0.5966220721679e+01, 0.1589072916335e+01,
6566 0.6150223411438e-10, 0.1780985591923e+01, 0.8827390247185e+01,
6567 0.6272087858000e-10, 0.3184305429012e+01, 0.8429241228195e+01,
6568
6569 0.5540476311040e-10, 0.3801260595433e+01, 0.4933208510675e+01,
6570 0.7331901699361e-10, 0.5205948591865e+01, 0.4535059491685e+01,
6571 0.6018528702791e-10, 0.4770139083623e+01, 0.1255903824622e+02,
6572 0.5150530724804e-10, 0.3574796899585e+01, 0.1176985366291e+02,
6573 0.6471933741811e-10, 0.2679787266521e+01, 0.5088628793478e+01,
6574 0.5317460644174e-10, 0.9528763345494e+00, 0.3154687086868e+01,
6575 0.4832187748783e-10, 0.5329322498232e+01, 0.6040347114260e+01,
6576 0.4716763555110e-10, 0.2395235316466e+01, 0.5331357529664e+01,
6577 0.4871509139861e-10, 0.3056663648823e+01, 0.1256967486051e+02,
6578 0.4598417696768e-10, 0.4452762609019e+01, 0.6525804586632e+01,
6579
6580 0.5674189533175e-10, 0.9879680872193e+00, 0.5729506548653e+01,
6581 0.4073560328195e-10, 0.5939127696986e+01, 0.7632943190217e+01,
6582 0.5040994945359e-10, 0.4549875824510e+01, 0.8031092209206e+01,
6583 0.5078185134679e-10, 0.7346659893982e+00, 0.7477522907414e+01,
6584 0.3769343537061e-10, 0.1071317188367e+01, 0.7234794171227e+01,
6585 0.4980331365299e-10, 0.2500345341784e+01, 0.6836645152238e+01,
6586 0.3458236594757e-10, 0.3825159450711e+01, 0.1097707878456e+02,
6587 0.3578859493602e-10, 0.5299664791549e+01, 0.4164311961999e+01,
6588 0.3370504646419e-10, 0.5002316301593e+01, 0.1137170464392e+02,
6589 0.3299873338428e-10, 0.2526123275282e+01, 0.3930209696940e+01,
6590
6591 0.4304917318409e-10, 0.3368078557132e+01, 0.1592596075957e+01,
6592 0.3402418753455e-10, 0.8385495425800e+00, 0.3128388763578e+01,
6593 0.2778460572146e-10, 0.3669905203240e+01, 0.7342457794669e+01,
6594 0.2782710128902e-10, 0.2691664812170e+00, 0.1748016358760e+01,
6595 0.2711725179646e-10, 0.4707487217718e+01, 0.5296909721118e+00,
6596 0.2981760946340e-10, 0.3190260867816e+00, 0.5368044267797e+00,
6597 0.2811672977772e-10, 0.3196532315372e+01, 0.7084896783808e+01,
6598 0.2863454474467e-10, 0.2263240324780e+00, 0.5223693906222e+01,
6599 0.3333464634051e-10, 0.3498451685065e+01, 0.8018209333619e+00,
6600 0.3312991747609e-10, 0.5839154477412e+01, 0.1554202828031e+00,
6601
6602 0.2813255564006e-10, 0.8268044346621e+00, 0.5225775174439e+00,
6603 0.2665098083966e-10, 0.3934021725360e+01, 0.5216580451554e+01,
6604 0.2349795705216e-10, 0.5197620913779e+01, 0.2146165377750e+01,
6605 0.2330352293961e-10, 0.2984999231807e+01, 0.1726015463500e+02,
6606 0.2728001683419e-10, 0.6521679638544e+00, 0.8635942003952e+01,
6607 0.2484061007669e-10, 0.3468955561097e+01, 0.5230807360890e+01,
6608 0.2646328768427e-10, 0.1013724533516e+01, 0.2629832328990e-01,
6609 0.2518630264831e-10, 0.6108081057122e+01, 0.5481254917084e+01,
6610 0.2421901455384e-10, 0.1651097776260e+01, 0.1349867339771e+01,
6611 0.6348533267831e-11, 0.3220226560321e+01, 0.8433466158131e+02 };
6612
6613 /* Sun-to-Earth, T^1, Z */
6614 static final double e1z[] = {
6615 0.2278290449966e-05, 0.3413716033863e+01, 0.6283075850446e+01,
6616 0.5429458209830e-07, 0.0000000000000e+00, 0.0000000000000e+00,
6617 0.1903240492525e-07, 0.3370592358297e+01, 0.1256615170089e+02,
6618 0.2385409276743e-09, 0.3327914718416e+01, 0.1884922755134e+02,
6619 0.8676928342573e-10, 0.1824006811264e+01, 0.5223693906222e+01,
6620 0.7765442593544e-10, 0.3888564279247e+01, 0.5507553240374e+01,
6621 0.7066158332715e-10, 0.5194267231944e+01, 0.2352866153506e+01,
6622 0.7092175288657e-10, 0.2333246960021e+01, 0.8399684731857e+02,
6623 0.5357582213535e-10, 0.2224031176619e+01, 0.5296909721118e+00,
6624 0.3828035865021e-10, 0.2156710933584e+01, 0.6279552690824e+01,
6625
6626 0.3824857220427e-10, 0.1529755219915e+01, 0.6286599010068e+01,
6627 0.3286995181628e-10, 0.4879512900483e+01, 0.1021328554739e+02 };
6628
6629 /* Sun-to-Earth, T^2, X */
6630 static final double e2x[] = {
6631 -0.4143818297913e-10, 0.0000000000000e+00, 0.0000000000000e+00,
6632 0.2171497694435e-10, 0.4398225628264e+01, 0.1256615170089e+02,
6633 0.9845398442516e-11, 0.2079720838384e+00, 0.6283075850446e+01,
6634 0.9256833552682e-12, 0.4191264694361e+01, 0.1884922755134e+02,
6635 0.1022049384115e-12, 0.5381133195658e+01, 0.8399684731857e+02 };
6636
6637 /* Sun-to-Earth, T^2, Y */
6638 static final double e2y[] = {
6639 0.5063375872532e-10, 0.0000000000000e+00, 0.0000000000000e+00,
6640 0.2173815785980e-10, 0.2827805833053e+01, 0.1256615170089e+02,
6641 0.1010231999920e-10, 0.4634612377133e+01, 0.6283075850446e+01,
6642 0.9259745317636e-12, 0.2620612076189e+01, 0.1884922755134e+02,
6643 0.1022202095812e-12, 0.3809562326066e+01, 0.8399684731857e+02 };
6644
6645 /* Sun-to-Earth, T^2, Z */
6646 static final double e2z[] = {
6647 0.9722666114891e-10, 0.5152219582658e+01, 0.6283075850446e+01,
6648 -0.3494819171909e-11, 0.0000000000000e+00, 0.0000000000000e+00,
6649 0.6713034376076e-12, 0.6440188750495e+00, 0.1256615170089e+02 };
6650
6651 }
6652 //subclassed the
6653 private static class SSB {
6654 /* SSB-to-Sun, T^0, X */
6655 static final double s0x[] = {
6656 0.4956757536410e-02, 0.3741073751789e+01, 0.5296909721118e+00,
6657 0.2718490072522e-02, 0.4016011511425e+01, 0.2132990797783e+00,
6658 0.1546493974344e-02, 0.2170528330642e+01, 0.3813291813120e-01,
6659 0.8366855276341e-03, 0.2339614075294e+01, 0.7478166569050e-01,
6660 0.2936777942117e-03, 0.0000000000000e+00, 0.0000000000000e+00,
6661 0.1201317439469e-03, 0.4090736353305e+01, 0.1059381944224e+01,
6662 0.7578550887230e-04, 0.3241518088140e+01, 0.4265981595566e+00,
6663 0.1941787367773e-04, 0.1012202064330e+01, 0.2061856251104e+00,
6664 0.1889227765991e-04, 0.3892520416440e+01, 0.2204125344462e+00,
6665 0.1937896968613e-04, 0.4797779441161e+01, 0.1495633313810e+00,
6666
6667 0.1434506110873e-04, 0.3868960697933e+01, 0.5225775174439e+00,
6668 0.1406659911580e-04, 0.4759766557397e+00, 0.5368044267797e+00,
6669 0.1179022300202e-04, 0.7774961520598e+00, 0.7626583626240e-01,
6670 0.8085864460959e-05, 0.3254654471465e+01, 0.3664874755930e-01,
6671 0.7622752967615e-05, 0.4227633103489e+01, 0.3961708870310e-01,
6672 0.6209171139066e-05, 0.2791828325711e+00, 0.7329749511860e-01,
6673 0.4366435633970e-05, 0.4440454875925e+01, 0.1589072916335e+01,
6674 0.3792124889348e-05, 0.5156393842356e+01, 0.7113454667900e-02,
6675 0.3154548963402e-05, 0.6157005730093e+01, 0.4194847048887e+00,
6676 0.3088359882942e-05, 0.2494567553163e+01, 0.6398972393349e+00,
6677
6678 0.2788440902136e-05, 0.4934318747989e+01, 0.1102062672231e+00,
6679 0.3039928456376e-05, 0.4895077702640e+01, 0.6283075850446e+01,
6680 0.2272258457679e-05, 0.5278394064764e+01, 0.1030928125552e+00,
6681 0.2162007057957e-05, 0.5802978019099e+01, 0.3163918923335e+00,
6682 0.1767632855737e-05, 0.3415346595193e-01, 0.1021328554739e+02,
6683 0.1349413459362e-05, 0.2001643230755e+01, 0.1484170571900e-02,
6684 0.1170141900476e-05, 0.2424750491620e+01, 0.6327837846670e+00,
6685 0.1054355266820e-05, 0.3123311487576e+01, 0.4337116142245e+00,
6686 0.9800822461610e-06, 0.3026258088130e+01, 0.1052268489556e+01,
6687 0.1091203749931e-05, 0.3157811670347e+01, 0.1162474756779e+01,
6688
6689 0.6960236715913e-06, 0.8219570542313e+00, 0.1066495398892e+01,
6690 0.5689257296909e-06, 0.1323052375236e+01, 0.9491756770005e+00,
6691 0.6613172135802e-06, 0.2765348881598e+00, 0.8460828644453e+00,
6692 0.6277702517571e-06, 0.5794064466382e+01, 0.1480791608091e+00,
6693 0.6304884066699e-06, 0.7323555380787e+00, 0.2243449970715e+00,
6694 0.4897850467382e-06, 0.3062464235399e+01, 0.3340612434717e+01,
6695 0.3759148598786e-06, 0.4588290469664e+01, 0.3516457698740e-01,
6696 0.3110520548195e-06, 0.1374299536572e+01, 0.6373574839730e-01,
6697 0.3064708359780e-06, 0.4222267485047e+01, 0.1104591729320e-01,
6698 0.2856347168241e-06, 0.3714202944973e+01, 0.1510475019529e+00,
6699
6700 0.2840945514288e-06, 0.2847972875882e+01, 0.4110125927500e-01,
6701 0.2378951599405e-06, 0.3762072563388e+01, 0.2275259891141e+00,
6702 0.2714229481417e-06, 0.1036049980031e+01, 0.2535050500000e-01,
6703 0.2323551717307e-06, 0.4682388599076e+00, 0.8582758298370e-01,
6704 0.1881790512219e-06, 0.4790565425418e+01, 0.2118763888447e+01,
6705 0.2261353968371e-06, 0.1669144912212e+01, 0.7181332454670e-01,
6706 0.2214546389848e-06, 0.3937717281614e+01, 0.2968341143800e-02,
6707 0.2184915594933e-06, 0.1129169845099e+00, 0.7775000683430e-01,
6708 0.2000164937936e-06, 0.4030009638488e+01, 0.2093666171530e+00,
6709 0.1966105136719e-06, 0.8745955786834e+00, 0.2172315424036e+00,
6710
6711 0.1904742332624e-06, 0.5919743598964e+01, 0.2022531624851e+00,
6712 0.1657399705031e-06, 0.2549141484884e+01, 0.7358765972222e+00,
6713 0.1574070533987e-06, 0.5277533020230e+01, 0.7429900518901e+00,
6714 0.1832261651039e-06, 0.3064688127777e+01, 0.3235053470014e+00,
6715 0.1733615346569e-06, 0.3011432799094e+01, 0.1385174140878e+00,
6716 0.1549124014496e-06, 0.4005569132359e+01, 0.5154640627760e+00,
6717 0.1637044713838e-06, 0.1831375966632e+01, 0.8531963191132e+00,
6718 0.1123420082383e-06, 0.1180270407578e+01, 0.1990721704425e+00,
6719 0.1083754165740e-06, 0.3414101320863e+00, 0.5439178814476e+00,
6720 0.1156638012655e-06, 0.6130479452594e+00, 0.5257585094865e+00,
6721
6722 0.1142548785134e-06, 0.3724761948846e+01, 0.5336234347371e+00,
6723 0.7921463895965e-07, 0.2435425589361e+01, 0.1478866649112e+01,
6724 0.7428600285231e-07, 0.3542144398753e+01, 0.2164800718209e+00,
6725 0.8323211246747e-07, 0.3525058072354e+01, 0.1692165728891e+01,
6726 0.7257595116312e-07, 0.1364299431982e+01, 0.2101180877357e+00,
6727 0.7111185833236e-07, 0.2460478875808e+01, 0.4155522422634e+00,
6728 0.6868090383716e-07, 0.4397327670704e+01, 0.1173197218910e+00,
6729 0.7226419974175e-07, 0.4042647308905e+01, 0.1265567569334e+01,
6730 0.6955642383177e-07, 0.2865047906085e+01, 0.9562891316684e+00,
6731 0.7492139296331e-07, 0.5014278994215e+01, 0.1422690933580e-01,
6732
6733 0.6598363128857e-07, 0.2376730020492e+01, 0.6470106940028e+00,
6734 0.7381147293385e-07, 0.3272990384244e+01, 0.1581959461667e+01,
6735 0.6402909624032e-07, 0.5302290955138e+01, 0.9597935788730e-01,
6736 0.6237454263857e-07, 0.5444144425332e+01, 0.7084920306520e-01,
6737 0.5241198544016e-07, 0.4215359579205e+01, 0.5265099800692e+00,
6738 0.5144463853918e-07, 0.1218916689916e+00, 0.5328719641544e+00,
6739 0.5868164772299e-07, 0.2369402002213e+01, 0.7871412831580e-01,
6740 0.6233195669151e-07, 0.1254922242403e+01, 0.2608790314060e+02,
6741 0.6068463791422e-07, 0.5679713760431e+01, 0.1114304132498e+00,
6742 0.4359361135065e-07, 0.6097219641646e+00, 0.1375773836557e+01,
6743
6744 0.4686510366826e-07, 0.4786231041431e+01, 0.1143987543936e+00,
6745 0.3758977287225e-07, 0.1167368068139e+01, 0.1596186371003e+01,
6746 0.4282051974778e-07, 0.1519471064319e+01, 0.2770348281756e+00,
6747 0.5153765386113e-07, 0.1860532322984e+01, 0.2228608264996e+00,
6748 0.4575129387188e-07, 0.7632857887158e+00, 0.1465949902372e+00,
6749 0.3326844933286e-07, 0.1298219485285e+01, 0.5070101000000e-01,
6750 0.3748617450984e-07, 0.1046510321062e+01, 0.4903339079539e+00,
6751 0.2816756661499e-07, 0.3434522346190e+01, 0.2991266627620e+00,
6752 0.3412750405039e-07, 0.2523766270318e+01, 0.3518164938661e+00,
6753 0.2655796761776e-07, 0.2904422260194e+01, 0.6256703299991e+00,
6754
6755 0.2963597929458e-07, 0.5923900431149e+00, 0.1099462426779e+00,
6756 0.2539523734781e-07, 0.4851947722567e+01, 0.1256615170089e+02,
6757 0.2283087914139e-07, 0.3400498595496e+01, 0.6681224869435e+01,
6758 0.2321309799331e-07, 0.5789099148673e+01, 0.3368040641550e-01,
6759 0.2549657649750e-07, 0.3991856479792e-01, 0.1169588211447e+01,
6760 0.2290462303977e-07, 0.2788567577052e+01, 0.1045155034888e+01,
6761 0.1945398522914e-07, 0.3290896998176e+01, 0.1155361302111e+01,
6762 0.1849171512638e-07, 0.2698060129367e+01, 0.4452511715700e-02,
6763 0.1647199834254e-07, 0.3016735644085e+01, 0.4408250688924e+00,
6764 0.1529530765273e-07, 0.5573043116178e+01, 0.6521991896920e-01,
6765
6766 0.1433199339978e-07, 0.1481192356147e+01, 0.9420622223326e+00,
6767 0.1729134193602e-07, 0.1422817538933e+01, 0.2108507877249e+00,
6768 0.1716463931346e-07, 0.3469468901855e+01, 0.2157473718317e+00,
6769 0.1391206061378e-07, 0.6122436220547e+01, 0.4123712502208e+00,
6770 0.1404746661924e-07, 0.1647765641936e+01, 0.4258542984690e-01,
6771 0.1410452399455e-07, 0.5989729161964e+01, 0.2258291676434e+00,
6772 0.1089828772168e-07, 0.2833705509371e+01, 0.4226656969313e+00,
6773 0.1047374564948e-07, 0.5090690007331e+00, 0.3092784376656e+00,
6774 0.1358279126532e-07, 0.5128990262836e+01, 0.7923417740620e-01,
6775 0.1020456476148e-07, 0.9632772880808e+00, 0.1456308687557e+00,
6776
6777 0.1033428735328e-07, 0.3223779318418e+01, 0.1795258541446e+01,
6778 0.1412435841540e-07, 0.2410271572721e+01, 0.1525316725248e+00,
6779 0.9722759371574e-08, 0.2333531395690e+01, 0.8434341241180e-01,
6780 0.9657334084704e-08, 0.6199270974168e+01, 0.1272681024002e+01,
6781 0.1083641148690e-07, 0.2864222292929e+01, 0.7032915397480e-01,
6782 0.1067318403838e-07, 0.5833458866568e+00, 0.2123349582968e+00,
6783 0.1062366201976e-07, 0.4307753989494e+01, 0.2142632012598e+00,
6784 0.1236364149266e-07, 0.2873917870593e+01, 0.1847279083684e+00,
6785 0.1092759489593e-07, 0.2959887266733e+01, 0.1370332435159e+00,
6786 0.8912069362899e-08, 0.5141213702562e+01, 0.2648454860559e+01,
6787
6788 0.9656467707970e-08, 0.4532182462323e+01, 0.4376440768498e+00,
6789 0.8098386150135e-08, 0.2268906338379e+01, 0.2880807454688e+00,
6790 0.7857714675000e-08, 0.4055544260745e+01, 0.2037373330570e+00,
6791 0.7288455940646e-08, 0.5357901655142e+01, 0.1129145838217e+00,
6792 0.9450595950552e-08, 0.4264926963939e+01, 0.5272426800584e+00,
6793 0.9381718247537e-08, 0.7489366976576e-01, 0.5321392641652e+00,
6794 0.7079052646038e-08, 0.1923311052874e+01, 0.6288513220417e+00,
6795 0.9259004415344e-08, 0.2970256853438e+01, 0.1606092486742e+00,
6796 0.8259801499742e-08, 0.3327056314697e+01, 0.8389694097774e+00,
6797 0.6476334355779e-08, 0.2954925505727e+01, 0.2008557621224e+01,
6798
6799 0.5984021492007e-08, 0.9138753105829e+00, 0.2042657109477e+02,
6800 0.5989546863181e-08, 0.3244464082031e+01, 0.2111650433779e+01,
6801 0.6233108606023e-08, 0.4995232638403e+00, 0.4305306221819e+00,
6802 0.6877299149965e-08, 0.2834987233449e+01, 0.9561746721300e-02,
6803 0.8311234227190e-08, 0.2202951835758e+01, 0.3801276407308e+00,
6804 0.6599472832414e-08, 0.4478581462618e+01, 0.1063314406849e+01,
6805 0.6160491096549e-08, 0.5145858696411e+01, 0.1368660381889e+01,
6806 0.6164772043891e-08, 0.3762976697911e+00, 0.4234171675140e+00,
6807 0.6363248684450e-08, 0.3162246718685e+01, 0.1253008786510e-01,
6808 0.6448587520999e-08, 0.3442693302119e+01, 0.5287268506303e+00,
6809
6810 0.6431662283977e-08, 0.8977549136606e+00, 0.5306550935933e+00,
6811 0.6351223158474e-08, 0.4306447410369e+01, 0.5217580628120e+02,
6812 0.5476721393451e-08, 0.3888529177855e+01, 0.2221856701002e+01,
6813 0.5341772572619e-08, 0.2655560662512e+01, 0.7466759693650e-01,
6814 0.5337055758302e-08, 0.5164990735946e+01, 0.7489573444450e-01,
6815 0.5373120816787e-08, 0.6041214553456e+01, 0.1274714967946e+00,
6816 0.5392351705426e-08, 0.9177763485932e+00, 0.1055449481598e+01,
6817 0.6688495850205e-08, 0.3089608126937e+01, 0.2213766559277e+00,
6818 0.5072003660362e-08, 0.4311316541553e+01, 0.2132517061319e+00,
6819 0.5070726650455e-08, 0.5790675464444e+00, 0.2133464534247e+00,
6820
6821 0.5658012950032e-08, 0.2703945510675e+01, 0.7287631425543e+00,
6822 0.4835509924854e-08, 0.2975422976065e+01, 0.7160067364790e-01,
6823 0.6479821978012e-08, 0.1324168733114e+01, 0.2209183458640e-01,
6824 0.6230636494980e-08, 0.2860103632836e+01, 0.3306188016693e+00,
6825 0.4649239516213e-08, 0.4832259763403e+01, 0.7796265773310e-01,
6826 0.6487325792700e-08, 0.2726165825042e+01, 0.3884652414254e+00,
6827 0.4682823682770e-08, 0.6966602455408e+00, 0.1073608853559e+01,
6828 0.5704230804976e-08, 0.5669634104606e+01, 0.8731175355560e-01,
6829 0.6125413585489e-08, 0.1513386538915e+01, 0.7605151500000e-01,
6830 0.6035825038187e-08, 0.1983509168227e+01, 0.9846002785331e+00,
6831
6832 0.4331123462303e-08, 0.2782892992807e+01, 0.4297791515992e+00,
6833 0.4681107685143e-08, 0.5337232886836e+01, 0.2127790306879e+00,
6834 0.4669105829655e-08, 0.5837133792160e+01, 0.2138191288687e+00,
6835 0.5138823602365e-08, 0.3080560200507e+01, 0.7233337363710e-01,
6836 0.4615856664534e-08, 0.1661747897471e+01, 0.8603097737811e+00,
6837 0.4496916702197e-08, 0.2112508027068e+01, 0.7381754420900e-01,
6838 0.4278479042945e-08, 0.5716528462627e+01, 0.7574578717200e-01,
6839 0.3840525503932e-08, 0.6424172726492e+00, 0.3407705765729e+00,
6840 0.4866636509685e-08, 0.4919244697715e+01, 0.7722995774390e-01,
6841 0.3526100639296e-08, 0.2550821052734e+01, 0.6225157782540e-01,
6842
6843 0.3939558488075e-08, 0.3939331491710e+01, 0.5268983110410e-01,
6844 0.4041268772576e-08, 0.2275337571218e+01, 0.3503323232942e+00,
6845 0.3948761842853e-08, 0.1999324200790e+01, 0.1451108196653e+00,
6846 0.3258394550029e-08, 0.9121001378200e+00, 0.5296435984654e+00,
6847 0.3257897048761e-08, 0.3428428660869e+01, 0.5297383457582e+00,
6848 0.3842559031298e-08, 0.6132927720035e+01, 0.9098186128426e+00,
6849 0.3109920095448e-08, 0.7693650193003e+00, 0.3932462625300e-02,
6850 0.3132237775119e-08, 0.3621293854908e+01, 0.2346394437820e+00,
6851 0.3942189421510e-08, 0.4841863659733e+01, 0.3180992042600e-02,
6852 0.3796972285340e-08, 0.1814174994268e+01, 0.1862120789403e+00,
6853
6854 0.3995640233688e-08, 0.1386990406091e+01, 0.4549093064213e+00,
6855 0.2875013727414e-08, 0.9178318587177e+00, 0.1905464808669e+01,
6856 0.3073719932844e-08, 0.2688923811835e+01, 0.3628624111593e+00,
6857 0.2731016580075e-08, 0.1188259127584e+01, 0.2131850110243e+00,
6858 0.2729549896546e-08, 0.3702160634273e+01, 0.2134131485323e+00,
6859 0.3339372892449e-08, 0.7199163960331e+00, 0.2007689919132e+00,
6860 0.2898833764204e-08, 0.1916709364999e+01, 0.5291709230214e+00,
6861 0.2894536549362e-08, 0.2424043195547e+01, 0.5302110212022e+00,
6862 0.3096872473843e-08, 0.4445894977497e+01, 0.2976424921901e+00,
6863 0.2635672326810e-08, 0.3814366984117e+01, 0.1485980103780e+01,
6864
6865 0.3649302697001e-08, 0.2924200596084e+01, 0.6044726378023e+00,
6866 0.3127954585895e-08, 0.1842251648327e+01, 0.1084620721060e+00,
6867 0.2616040173947e-08, 0.4155841921984e+01, 0.1258454114666e+01,
6868 0.2597395859860e-08, 0.1158045978874e+00, 0.2103781122809e+00,
6869 0.2593286172210e-08, 0.4771850408691e+01, 0.2162200472757e+00,
6870 0.2481823585747e-08, 0.4608842558889e+00, 0.1062562936266e+01,
6871 0.2742219550725e-08, 0.1538781127028e+01, 0.5651155736444e+00,
6872 0.3199558469610e-08, 0.3226647822878e+00, 0.7036329877322e+00,
6873 0.2666088542957e-08, 0.1967991731219e+00, 0.1400015846597e+00,
6874 0.2397067430580e-08, 0.3707036669873e+01, 0.2125476091956e+00,
6875
6876 0.2376570772738e-08, 0.1182086628042e+01, 0.2140505503610e+00,
6877 0.2547228007887e-08, 0.4906256820629e+01, 0.1534957940063e+00,
6878 0.2265575594114e-08, 0.3414949866857e+01, 0.2235935264888e+00,
6879 0.2464381430585e-08, 0.4599122275378e+01, 0.2091065926078e+00,
6880 0.2433408527044e-08, 0.2830751145445e+00, 0.2174915669488e+00,
6881 0.2443605509076e-08, 0.4212046432538e+01, 0.1739420156204e+00,
6882 0.2319779262465e-08, 0.9881978408630e+00, 0.7530171478090e-01,
6883 0.2284622835465e-08, 0.5565347331588e+00, 0.7426161660010e-01,
6884 0.2467268750783e-08, 0.5655708150766e+00, 0.2526561439362e+00,
6885 0.2808513492782e-08, 0.1418405053408e+01, 0.5636314030725e+00,
6886
6887 0.2329528932532e-08, 0.4069557545675e+01, 0.1056200952181e+01,
6888 0.9698639532817e-09, 0.1074134313634e+01, 0.7826370942180e+02 };
6889
6890 /* SSB-to-Sun, T^0, Y */
6891 static final double s0y[] = {
6892 0.4955392320126e-02, 0.2170467313679e+01, 0.5296909721118e+00,
6893 0.2722325167392e-02, 0.2444433682196e+01, 0.2132990797783e+00,
6894 0.1546579925346e-02, 0.5992779281546e+00, 0.3813291813120e-01,
6895 0.8363140252966e-03, 0.7687356310801e+00, 0.7478166569050e-01,
6896 0.3385792683603e-03, 0.0000000000000e+00, 0.0000000000000e+00,
6897 0.1201192221613e-03, 0.2520035601514e+01, 0.1059381944224e+01,
6898 0.7587125720554e-04, 0.1669954006449e+01, 0.4265981595566e+00,
6899 0.1964155361250e-04, 0.5707743963343e+01, 0.2061856251104e+00,
6900 0.1891900364909e-04, 0.2320960679937e+01, 0.2204125344462e+00,
6901 0.1937373433356e-04, 0.3226940689555e+01, 0.1495633313810e+00,
6902
6903 0.1437139941351e-04, 0.2301626908096e+01, 0.5225775174439e+00,
6904 0.1406267683099e-04, 0.5188579265542e+01, 0.5368044267797e+00,
6905 0.1178703080346e-04, 0.5489483248476e+01, 0.7626583626240e-01,
6906 0.8079835186041e-05, 0.1683751835264e+01, 0.3664874755930e-01,
6907 0.7623253594652e-05, 0.2656400462961e+01, 0.3961708870310e-01,
6908 0.6248667483971e-05, 0.4992775362055e+01, 0.7329749511860e-01,
6909 0.4366353695038e-05, 0.2869706279678e+01, 0.1589072916335e+01,
6910 0.3829101568895e-05, 0.3572131359950e+01, 0.7113454667900e-02,
6911 0.3175733773908e-05, 0.4535372530045e+01, 0.4194847048887e+00,
6912 0.3092437902159e-05, 0.9230153317909e+00, 0.6398972393349e+00,
6913
6914 0.2874168812154e-05, 0.3363143761101e+01, 0.1102062672231e+00,
6915 0.3040119321826e-05, 0.3324250895675e+01, 0.6283075850446e+01,
6916 0.2699723308006e-05, 0.2917882441928e+00, 0.1030928125552e+00,
6917 0.2134832683534e-05, 0.4220997202487e+01, 0.3163918923335e+00,
6918 0.1770412139433e-05, 0.4747318496462e+01, 0.1021328554739e+02,
6919 0.1377264209373e-05, 0.4305058462401e+00, 0.1484170571900e-02,
6920 0.1127814538960e-05, 0.8538177240740e+00, 0.6327837846670e+00,
6921 0.1055608090130e-05, 0.1551800742580e+01, 0.4337116142245e+00,
6922 0.9802673861420e-06, 0.1459646735377e+01, 0.1052268489556e+01,
6923 0.1090329461951e-05, 0.1587351228711e+01, 0.1162474756779e+01,
6924
6925 0.6959590025090e-06, 0.5534442628766e+01, 0.1066495398892e+01,
6926 0.5664914529542e-06, 0.6030673003297e+01, 0.9491756770005e+00,
6927 0.6607787763599e-06, 0.4989507233927e+01, 0.8460828644453e+00,
6928 0.6269725742838e-06, 0.4222951804572e+01, 0.1480791608091e+00,
6929 0.6301889697863e-06, 0.5444316669126e+01, 0.2243449970715e+00,
6930 0.4891042662861e-06, 0.1490552839784e+01, 0.3340612434717e+01,
6931 0.3457083123290e-06, 0.3030475486049e+01, 0.3516457698740e-01,
6932 0.3032559967314e-06, 0.2652038793632e+01, 0.1104591729320e-01,
6933 0.2841133988903e-06, 0.1276744786829e+01, 0.4110125927500e-01,
6934 0.2855564444432e-06, 0.2143368674733e+01, 0.1510475019529e+00,
6935
6936 0.2765157135038e-06, 0.5444186109077e+01, 0.6373574839730e-01,
6937 0.2382312465034e-06, 0.2190521137593e+01, 0.2275259891141e+00,
6938 0.2808060365077e-06, 0.5735195064841e+01, 0.2535050500000e-01,
6939 0.2332175234405e-06, 0.9481985524859e-01, 0.7181332454670e-01,
6940 0.2322488199659e-06, 0.5180499361533e+01, 0.8582758298370e-01,
6941 0.1881850258423e-06, 0.3219788273885e+01, 0.2118763888447e+01,
6942 0.2196111392808e-06, 0.2366941159761e+01, 0.2968341143800e-02,
6943 0.2183810335519e-06, 0.4825445110915e+01, 0.7775000683430e-01,
6944 0.2002733093326e-06, 0.2457148995307e+01, 0.2093666171530e+00,
6945 0.1967111767229e-06, 0.5586291545459e+01, 0.2172315424036e+00,
6946
6947 0.1568473250543e-06, 0.3708003123320e+01, 0.7429900518901e+00,
6948 0.1852528314300e-06, 0.4310638151560e+01, 0.2022531624851e+00,
6949 0.1832111226447e-06, 0.1494665322656e+01, 0.3235053470014e+00,
6950 0.1746805502310e-06, 0.1451378500784e+01, 0.1385174140878e+00,
6951 0.1555730966650e-06, 0.1068040418198e+01, 0.7358765972222e+00,
6952 0.1554883462559e-06, 0.2442579035461e+01, 0.5154640627760e+00,
6953 0.1638380568746e-06, 0.2597913420625e+00, 0.8531963191132e+00,
6954 0.1159938593640e-06, 0.5834512021280e+01, 0.1990721704425e+00,
6955 0.1083427965695e-06, 0.5054033177950e+01, 0.5439178814476e+00,
6956 0.1156480369431e-06, 0.5325677432457e+01, 0.5257585094865e+00,
6957
6958 0.1141308860095e-06, 0.2153403923857e+01, 0.5336234347371e+00,
6959 0.7913146470946e-07, 0.8642846847027e+00, 0.1478866649112e+01,
6960 0.7439752463733e-07, 0.1970628496213e+01, 0.2164800718209e+00,
6961 0.7280277104079e-07, 0.6073307250609e+01, 0.2101180877357e+00,
6962 0.8319567719136e-07, 0.1954371928334e+01, 0.1692165728891e+01,
6963 0.7137705549290e-07, 0.8904989440909e+00, 0.4155522422634e+00,
6964 0.6900825396225e-07, 0.2825717714977e+01, 0.1173197218910e+00,
6965 0.7245757216635e-07, 0.2481677513331e+01, 0.1265567569334e+01,
6966 0.6961165696255e-07, 0.1292955312978e+01, 0.9562891316684e+00,
6967 0.7571804456890e-07, 0.3427517575069e+01, 0.1422690933580e-01,
6968
6969 0.6605425721904e-07, 0.8052192701492e+00, 0.6470106940028e+00,
6970 0.7375477357248e-07, 0.1705076390088e+01, 0.1581959461667e+01,
6971 0.7041664951470e-07, 0.4848356967891e+00, 0.9597935788730e-01,
6972 0.6322199535763e-07, 0.3878069473909e+01, 0.7084920306520e-01,
6973 0.5244380279191e-07, 0.2645560544125e+01, 0.5265099800692e+00,
6974 0.5143125704988e-07, 0.4834486101370e+01, 0.5328719641544e+00,
6975 0.5871866319373e-07, 0.7981472548900e+00, 0.7871412831580e-01,
6976 0.6300822573871e-07, 0.5979398788281e+01, 0.2608790314060e+02,
6977 0.6062154271548e-07, 0.4108655402756e+01, 0.1114304132498e+00,
6978 0.4361912339976e-07, 0.5322624319280e+01, 0.1375773836557e+01,
6979
6980 0.4417005920067e-07, 0.6240817359284e+01, 0.2770348281756e+00,
6981 0.4686806749936e-07, 0.3214977301156e+01, 0.1143987543936e+00,
6982 0.3758892132305e-07, 0.5879809634765e+01, 0.1596186371003e+01,
6983 0.5151351332319e-07, 0.2893377688007e+00, 0.2228608264996e+00,
6984 0.4554683578572e-07, 0.5475427144122e+01, 0.1465949902372e+00,
6985 0.3442381385338e-07, 0.5992034796640e+01, 0.5070101000000e-01,
6986 0.2831093954933e-07, 0.5367350273914e+01, 0.3092784376656e+00,
6987 0.3756267090084e-07, 0.5758171285420e+01, 0.4903339079539e+00,
6988 0.2816374679892e-07, 0.1863718700923e+01, 0.2991266627620e+00,
6989 0.3419307025569e-07, 0.9524347534130e+00, 0.3518164938661e+00,
6990
6991 0.2904250494239e-07, 0.5304471615602e+01, 0.1099462426779e+00,
6992 0.2471734511206e-07, 0.1297069793530e+01, 0.6256703299991e+00,
6993 0.2539620831872e-07, 0.3281126083375e+01, 0.1256615170089e+02,
6994 0.2281017868007e-07, 0.1829122133165e+01, 0.6681224869435e+01,
6995 0.2275319473335e-07, 0.5797198160181e+01, 0.3932462625300e-02,
6996 0.2547755368442e-07, 0.4752697708330e+01, 0.1169588211447e+01,
6997 0.2285979669317e-07, 0.1223205292886e+01, 0.1045155034888e+01,
6998 0.1913386560994e-07, 0.1757532993389e+01, 0.1155361302111e+01,
6999 0.1809020525147e-07, 0.4246116108791e+01, 0.3368040641550e-01,
7000 0.1649213300201e-07, 0.1445162890627e+01, 0.4408250688924e+00,
7001
7002 0.1834972793932e-07, 0.1126917567225e+01, 0.4452511715700e-02,
7003 0.1439550648138e-07, 0.6160756834764e+01, 0.9420622223326e+00,
7004 0.1487645457041e-07, 0.4358761931792e+01, 0.4123712502208e+00,
7005 0.1731729516660e-07, 0.6134456753344e+01, 0.2108507877249e+00,
7006 0.1717747163567e-07, 0.1898186084455e+01, 0.2157473718317e+00,
7007 0.1418190430374e-07, 0.4180286741266e+01, 0.6521991896920e-01,
7008 0.1404844134873e-07, 0.7654053565412e-01, 0.4258542984690e-01,
7009 0.1409842846538e-07, 0.4418612420312e+01, 0.2258291676434e+00,
7010 0.1090948346291e-07, 0.1260615686131e+01, 0.4226656969313e+00,
7011 0.1357577323612e-07, 0.3558248818690e+01, 0.7923417740620e-01,
7012
7013 0.1018154061960e-07, 0.5676087241256e+01, 0.1456308687557e+00,
7014 0.1412073972109e-07, 0.8394392632422e+00, 0.1525316725248e+00,
7015 0.1030938326496e-07, 0.1653593274064e+01, 0.1795258541446e+01,
7016 0.1180081567104e-07, 0.1285802592036e+01, 0.7032915397480e-01,
7017 0.9708510575650e-08, 0.7631889488106e+00, 0.8434341241180e-01,
7018 0.9637689663447e-08, 0.4630642649176e+01, 0.1272681024002e+01,
7019 0.1068910429389e-07, 0.5294934032165e+01, 0.2123349582968e+00,
7020 0.1063716179336e-07, 0.2736266800832e+01, 0.2142632012598e+00,
7021 0.1234858713814e-07, 0.1302891146570e+01, 0.1847279083684e+00,
7022 0.8912631189738e-08, 0.3570415993621e+01, 0.2648454860559e+01,
7023
7024 0.1036378285534e-07, 0.4236693440949e+01, 0.1370332435159e+00,
7025 0.9667798501561e-08, 0.2960768892398e+01, 0.4376440768498e+00,
7026 0.8108314201902e-08, 0.6987781646841e+00, 0.2880807454688e+00,
7027 0.7648364324628e-08, 0.2499017863863e+01, 0.2037373330570e+00,
7028 0.7286136828406e-08, 0.3787426951665e+01, 0.1129145838217e+00,
7029 0.9448237743913e-08, 0.2694354332983e+01, 0.5272426800584e+00,
7030 0.9374276106428e-08, 0.4787121277064e+01, 0.5321392641652e+00,
7031 0.7100226287462e-08, 0.3530238792101e+00, 0.6288513220417e+00,
7032 0.9253056659571e-08, 0.1399478925664e+01, 0.1606092486742e+00,
7033 0.6636432145504e-08, 0.3479575438447e+01, 0.1368660381889e+01,
7034
7035 0.6469975312932e-08, 0.1383669964800e+01, 0.2008557621224e+01,
7036 0.7335849729765e-08, 0.1243698166898e+01, 0.9561746721300e-02,
7037 0.8743421205855e-08, 0.3776164289301e+01, 0.3801276407308e+00,
7038 0.5993635744494e-08, 0.5627122113596e+01, 0.2042657109477e+02,
7039 0.5981008479693e-08, 0.1674336636752e+01, 0.2111650433779e+01,
7040 0.6188535145838e-08, 0.5214925208672e+01, 0.4305306221819e+00,
7041 0.6596074017566e-08, 0.2907653268124e+01, 0.1063314406849e+01,
7042 0.6630815126226e-08, 0.2127643669658e+01, 0.8389694097774e+00,
7043 0.6156772830040e-08, 0.5082160803295e+01, 0.4234171675140e+00,
7044 0.6446960563014e-08, 0.1872100916905e+01, 0.5287268506303e+00,
7045
7046 0.6429324424668e-08, 0.5610276103577e+01, 0.5306550935933e+00,
7047 0.6302232396465e-08, 0.1592152049607e+01, 0.1253008786510e-01,
7048 0.6399244436159e-08, 0.2746214421532e+01, 0.5217580628120e+02,
7049 0.5474965172558e-08, 0.2317666374383e+01, 0.2221856701002e+01,
7050 0.5339293190692e-08, 0.1084724961156e+01, 0.7466759693650e-01,
7051 0.5334733683389e-08, 0.3594106067745e+01, 0.7489573444450e-01,
7052 0.5392665782110e-08, 0.5630254365606e+01, 0.1055449481598e+01,
7053 0.6682075673789e-08, 0.1518480041732e+01, 0.2213766559277e+00,
7054 0.5079130495960e-08, 0.2739765115711e+01, 0.2132517061319e+00,
7055 0.5077759793261e-08, 0.5290711290094e+01, 0.2133464534247e+00,
7056
7057 0.4832037368310e-08, 0.1404473217200e+01, 0.7160067364790e-01,
7058 0.6463279674802e-08, 0.6038381695210e+01, 0.2209183458640e-01,
7059 0.6240592771560e-08, 0.1290170653666e+01, 0.3306188016693e+00,
7060 0.4672013521493e-08, 0.3261895939677e+01, 0.7796265773310e-01,
7061 0.6500650750348e-08, 0.1154522312095e+01, 0.3884652414254e+00,
7062 0.6344161389053e-08, 0.6206111545062e+01, 0.7605151500000e-01,
7063 0.4682518370646e-08, 0.5409118796685e+01, 0.1073608853559e+01,
7064 0.5329460015591e-08, 0.1202985784864e+01, 0.7287631425543e+00,
7065 0.5701588675898e-08, 0.4098715257064e+01, 0.8731175355560e-01,
7066 0.6030690867211e-08, 0.4132033218460e+00, 0.9846002785331e+00,
7067
7068 0.4336256312655e-08, 0.1211415991827e+01, 0.4297791515992e+00,
7069 0.4688498808975e-08, 0.3765479072409e+01, 0.2127790306879e+00,
7070 0.4675578609335e-08, 0.4265540037226e+01, 0.2138191288687e+00,
7071 0.4225578112158e-08, 0.5237566010676e+01, 0.3407705765729e+00,
7072 0.5139422230028e-08, 0.1507173079513e+01, 0.7233337363710e-01,
7073 0.4619995093571e-08, 0.9023957449848e-01, 0.8603097737811e+00,
7074 0.4494776255461e-08, 0.5414930552139e+00, 0.7381754420900e-01,
7075 0.4274026276788e-08, 0.4145735303659e+01, 0.7574578717200e-01,
7076 0.5018141789353e-08, 0.3344408829055e+01, 0.3180992042600e-02,
7077 0.4866163952181e-08, 0.3348534657607e+01, 0.7722995774390e-01,
7078
7079 0.4111986020501e-08, 0.4198823597220e+00, 0.1451108196653e+00,
7080 0.3356142784950e-08, 0.5609144747180e+01, 0.1274714967946e+00,
7081 0.4070575554551e-08, 0.7028411059224e+00, 0.3503323232942e+00,
7082 0.3257451857278e-08, 0.5624697983086e+01, 0.5296435984654e+00,
7083 0.3256973703026e-08, 0.1857842076707e+01, 0.5297383457582e+00,
7084 0.3830771508640e-08, 0.4562887279931e+01, 0.9098186128426e+00,
7085 0.3725024005962e-08, 0.2358058692652e+00, 0.1084620721060e+00,
7086 0.3136763921756e-08, 0.2049731526845e+01, 0.2346394437820e+00,
7087 0.3795147256194e-08, 0.2432356296933e+00, 0.1862120789403e+00,
7088 0.2877342229911e-08, 0.5631101279387e+01, 0.1905464808669e+01,
7089
7090 0.3076931798805e-08, 0.1117615737392e+01, 0.3628624111593e+00,
7091 0.2734765945273e-08, 0.5899826516955e+01, 0.2131850110243e+00,
7092 0.2733405296885e-08, 0.2130562964070e+01, 0.2134131485323e+00,
7093 0.2898552353410e-08, 0.3462387048225e+00, 0.5291709230214e+00,
7094 0.2893736103681e-08, 0.8534352781543e+00, 0.5302110212022e+00,
7095 0.3095717734137e-08, 0.2875061429041e+01, 0.2976424921901e+00,
7096 0.2636190425832e-08, 0.2242512846659e+01, 0.1485980103780e+01,
7097 0.3645512095537e-08, 0.1354016903958e+01, 0.6044726378023e+00,
7098 0.2808173547723e-08, 0.6705114365631e-01, 0.6225157782540e-01,
7099 0.2625012866888e-08, 0.4775705748482e+01, 0.5268983110410e-01,
7100
7101 0.2572233995651e-08, 0.2638924216139e+01, 0.1258454114666e+01,
7102 0.2604238824792e-08, 0.4826358927373e+01, 0.2103781122809e+00,
7103 0.2596886385239e-08, 0.3200388483118e+01, 0.2162200472757e+00,
7104 0.3228057304264e-08, 0.5384848409563e+01, 0.2007689919132e+00,
7105 0.2481601798252e-08, 0.5173373487744e+01, 0.1062562936266e+01,
7106 0.2745977498864e-08, 0.6250966149853e+01, 0.5651155736444e+00,
7107 0.2669878833811e-08, 0.4906001352499e+01, 0.1400015846597e+00,
7108 0.3203986611711e-08, 0.5034333010005e+01, 0.7036329877322e+00,
7109 0.3354961227212e-08, 0.6108262423137e+01, 0.4549093064213e+00,
7110 0.2400407324558e-08, 0.2135399294955e+01, 0.2125476091956e+00,
7111
7112 0.2379905859802e-08, 0.5893721933961e+01, 0.2140505503610e+00,
7113 0.2550844302187e-08, 0.3331940762063e+01, 0.1534957940063e+00,
7114 0.2268824211001e-08, 0.1843418461035e+01, 0.2235935264888e+00,
7115 0.2464700891204e-08, 0.3029548547230e+01, 0.2091065926078e+00,
7116 0.2436814726024e-08, 0.4994717970364e+01, 0.2174915669488e+00,
7117 0.2443623894745e-08, 0.2645102591375e+01, 0.1739420156204e+00,
7118 0.2318701783838e-08, 0.5700547397897e+01, 0.7530171478090e-01,
7119 0.2284448700256e-08, 0.5268898905872e+01, 0.7426161660010e-01,
7120 0.2468848123510e-08, 0.5276280575078e+01, 0.2526561439362e+00,
7121 0.2814052350303e-08, 0.6130168623475e+01, 0.5636314030725e+00,
7122
7123 0.2243662755220e-08, 0.6631692457995e+00, 0.8886590321940e-01,
7124 0.2330795855941e-08, 0.2499435487702e+01, 0.1056200952181e+01,
7125 0.9757679038404e-09, 0.5796846023126e+01, 0.7826370942180e+02 };
7126
7127 /* SSB-to-Sun, T^0, Z */
7128 static final double s0z[] = {
7129 0.1181255122986e-03, 0.4607918989164e+00, 0.2132990797783e+00,
7130 0.1127777651095e-03, 0.4169146331296e+00, 0.5296909721118e+00,
7131 0.4777754401806e-04, 0.4582657007130e+01, 0.3813291813120e-01,
7132 0.1129354285772e-04, 0.5758735142480e+01, 0.7478166569050e-01,
7133 -0.1149543637123e-04, 0.0000000000000e+00, 0.0000000000000e+00,
7134 0.3298730512306e-05, 0.5978801994625e+01, 0.4265981595566e+00,
7135 0.2733376706079e-05, 0.7665413691040e+00, 0.1059381944224e+01,
7136 0.9426389657270e-06, 0.3710201265838e+01, 0.2061856251104e+00,
7137 0.8187517749552e-06, 0.3390675605802e+00, 0.2204125344462e+00,
7138 0.4080447871819e-06, 0.4552296640088e+00, 0.5225775174439e+00,
7139
7140 0.3169973017028e-06, 0.3445455899321e+01, 0.5368044267797e+00,
7141 0.2438098615549e-06, 0.5664675150648e+01, 0.3664874755930e-01,
7142 0.2601897517235e-06, 0.1931894095697e+01, 0.1495633313810e+00,
7143 0.2314558080079e-06, 0.3666319115574e+00, 0.3961708870310e-01,
7144 0.1962549548002e-06, 0.3167411699020e+01, 0.7626583626240e-01,
7145 0.2180518287925e-06, 0.1544420746580e+01, 0.7113454667900e-02,
7146 0.1451382442868e-06, 0.1583756740070e+01, 0.1102062672231e+00,
7147 0.1358439007389e-06, 0.5239941758280e+01, 0.6398972393349e+00,
7148 0.1050585898028e-06, 0.2266958352859e+01, 0.3163918923335e+00,
7149 0.1050029870186e-06, 0.2711495250354e+01, 0.4194847048887e+00,
7150
7151 0.9934920679800e-07, 0.1116208151396e+01, 0.1589072916335e+01,
7152 0.1048395331560e-06, 0.3408619600206e+01, 0.1021328554739e+02,
7153 0.8370147196668e-07, 0.3810459401087e+01, 0.2535050500000e-01,
7154 0.7989856510998e-07, 0.3769910473647e+01, 0.7329749511860e-01,
7155 0.5441221655233e-07, 0.2416994903374e+01, 0.1030928125552e+00,
7156 0.4610812906784e-07, 0.5858503336994e+01, 0.4337116142245e+00,
7157 0.3923022803444e-07, 0.3354170010125e+00, 0.1484170571900e-02,
7158 0.2610725582128e-07, 0.5410600646324e+01, 0.6327837846670e+00,
7159 0.2455279767721e-07, 0.6120216681403e+01, 0.1162474756779e+01,
7160 0.2375530706525e-07, 0.6055443426143e+01, 0.1052268489556e+01,
7161
7162 0.1782967577553e-07, 0.3146108708004e+01, 0.8460828644453e+00,
7163 0.1581687095238e-07, 0.6255496089819e+00, 0.3340612434717e+01,
7164 0.1594657672461e-07, 0.3782604300261e+01, 0.1066495398892e+01,
7165 0.1563448615040e-07, 0.1997775733196e+01, 0.2022531624851e+00,
7166 0.1463624258525e-07, 0.1736316792088e+00, 0.3516457698740e-01,
7167 0.1331585056673e-07, 0.4331941830747e+01, 0.9491756770005e+00,
7168 0.1130634557637e-07, 0.6152017751825e+01, 0.2968341143800e-02,
7169 0.1028949607145e-07, 0.2101792614637e+00, 0.2275259891141e+00,
7170 0.1024074971618e-07, 0.4071833211074e+01, 0.5070101000000e-01,
7171 0.8826956060303e-08, 0.4861633688145e+00, 0.2093666171530e+00,
7172
7173 0.8572230171541e-08, 0.5268190724302e+01, 0.4110125927500e-01,
7174 0.7649332643544e-08, 0.5134543417106e+01, 0.2608790314060e+02,
7175 0.8581673291033e-08, 0.2920218146681e+01, 0.1480791608091e+00,
7176 0.8430589300938e-08, 0.3604576619108e+01, 0.2172315424036e+00,
7177 0.7776165501012e-08, 0.3772942249792e+01, 0.6373574839730e-01,
7178 0.8311070234408e-08, 0.6200412329888e+01, 0.3235053470014e+00,
7179 0.6927365212582e-08, 0.4543353113437e+01, 0.8531963191132e+00,
7180 0.6791574208598e-08, 0.2882188406238e+01, 0.7181332454670e-01,
7181 0.5593100811839e-08, 0.1776646892780e+01, 0.7429900518901e+00,
7182 0.4553381853021e-08, 0.3949617611240e+01, 0.7775000683430e-01,
7183
7184 0.5758000450068e-08, 0.3859251775075e+01, 0.1990721704425e+00,
7185 0.4281283457133e-08, 0.1466294631206e+01, 0.2118763888447e+01,
7186 0.4206935661097e-08, 0.5421776011706e+01, 0.1104591729320e-01,
7187 0.4213751641837e-08, 0.3412048993322e+01, 0.2243449970715e+00,
7188 0.5310506239878e-08, 0.5421641370995e+00, 0.5154640627760e+00,
7189 0.3827450341320e-08, 0.8887314524995e+00, 0.1510475019529e+00,
7190 0.4292435241187e-08, 0.1405043757194e+01, 0.1422690933580e-01,
7191 0.3189780702289e-08, 0.1060049293445e+01, 0.1173197218910e+00,
7192 0.3226611928069e-08, 0.6270858897442e+01, 0.2164800718209e+00,
7193 0.2893897608830e-08, 0.5117563223301e+01, 0.6470106940028e+00,
7194
7195 0.3239852024578e-08, 0.4079092237983e+01, 0.2101180877357e+00,
7196 0.2956892222200e-08, 0.1594917021704e+01, 0.3092784376656e+00,
7197 0.2980177912437e-08, 0.5258787667564e+01, 0.4155522422634e+00,
7198 0.3163725690776e-08, 0.3854589225479e+01, 0.8582758298370e-01,
7199 0.2662262399118e-08, 0.3561326430187e+01, 0.5257585094865e+00,
7200 0.2766689135729e-08, 0.3180732086830e+00, 0.1385174140878e+00,
7201 0.2411600278464e-08, 0.3324798335058e+01, 0.5439178814476e+00,
7202 0.2483527695131e-08, 0.4169069291947e+00, 0.5336234347371e+00,
7203 0.7788777276590e-09, 0.1900569908215e+01, 0.5217580628120e+02 };
7204
7205 /* SSB-to-Sun, T^1, X */
7206 static final double s1x[] = {
7207 -0.1296310361520e-07, 0.0000000000000e+00, 0.0000000000000e+00,
7208 0.8975769009438e-08, 0.1128891609250e+01, 0.4265981595566e+00,
7209 0.7771113441307e-08, 0.2706039877077e+01, 0.2061856251104e+00,
7210 0.7538303866642e-08, 0.2191281289498e+01, 0.2204125344462e+00,
7211 0.6061384579336e-08, 0.3248167319958e+01, 0.1059381944224e+01,
7212 0.5726994235594e-08, 0.5569981398610e+01, 0.5225775174439e+00,
7213 0.5616492836424e-08, 0.5057386614909e+01, 0.5368044267797e+00,
7214 0.1010881584769e-08, 0.3473577116095e+01, 0.7113454667900e-02,
7215 0.7259606157626e-09, 0.3651858593665e+00, 0.6398972393349e+00,
7216 0.8755095026935e-09, 0.1662835408338e+01, 0.4194847048887e+00,
7217
7218 0.5370491182812e-09, 0.1327673878077e+01, 0.4337116142245e+00,
7219 0.5743773887665e-09, 0.4250200846687e+01, 0.2132990797783e+00,
7220 0.4408103140300e-09, 0.3598752574277e+01, 0.1589072916335e+01,
7221 0.3101892374445e-09, 0.4887822983319e+01, 0.1052268489556e+01,
7222 0.3209453713578e-09, 0.9702272295114e+00, 0.5296909721118e+00,
7223 0.3017228286064e-09, 0.5484462275949e+01, 0.1066495398892e+01,
7224 0.3200700038601e-09, 0.2846613338643e+01, 0.1495633313810e+00,
7225 0.2137637279911e-09, 0.5692163292729e+00, 0.3163918923335e+00,
7226 0.1899686386727e-09, 0.2061077157189e+01, 0.2275259891141e+00,
7227 0.1401994545308e-09, 0.4177771136967e+01, 0.1102062672231e+00,
7228
7229 0.1578057810499e-09, 0.5782460597335e+01, 0.7626583626240e-01,
7230 0.1237713253351e-09, 0.5705900866881e+01, 0.5154640627760e+00,
7231 0.1313076837395e-09, 0.5163438179576e+01, 0.3664874755930e-01,
7232 0.1184963304860e-09, 0.3054804427242e+01, 0.6327837846670e+00,
7233 0.1238130878565e-09, 0.2317292575962e+01, 0.3961708870310e-01,
7234 0.1015959527736e-09, 0.2194643645526e+01, 0.7329749511860e-01,
7235 0.9017954423714e-10, 0.2868603545435e+01, 0.1990721704425e+00,
7236 0.8668024955603e-10, 0.4923849675082e+01, 0.5439178814476e+00,
7237 0.7756083930103e-10, 0.3014334135200e+01, 0.9491756770005e+00,
7238 0.7536503401741e-10, 0.2704886279769e+01, 0.1030928125552e+00,
7239
7240 0.5483308679332e-10, 0.6010983673799e+01, 0.8531963191132e+00,
7241 0.5184339620428e-10, 0.1952704573291e+01, 0.2093666171530e+00,
7242 0.5108658712030e-10, 0.2958575786649e+01, 0.2172315424036e+00,
7243 0.5019424524650e-10, 0.1736317621318e+01, 0.2164800718209e+00,
7244 0.4909312625978e-10, 0.3167216416257e+01, 0.2101180877357e+00,
7245 0.4456638901107e-10, 0.7697579923471e+00, 0.3235053470014e+00,
7246 0.4227030350925e-10, 0.3490910137928e+01, 0.6373574839730e-01,
7247 0.4095456040093e-10, 0.5178888984491e+00, 0.6470106940028e+00,
7248 0.4990537041422e-10, 0.3323887668974e+01, 0.1422690933580e-01,
7249 0.4321170010845e-10, 0.4288484987118e+01, 0.7358765972222e+00,
7250
7251 0.3544072091802e-10, 0.6021051579251e+01, 0.5265099800692e+00,
7252 0.3480198638687e-10, 0.4600027054714e+01, 0.5328719641544e+00,
7253 0.3440287244435e-10, 0.4349525970742e+01, 0.8582758298370e-01,
7254 0.3330628322713e-10, 0.2347391505082e+01, 0.1104591729320e-01,
7255 0.2973060707184e-10, 0.4789409286400e+01, 0.5257585094865e+00,
7256 0.2932606766089e-10, 0.5831693799927e+01, 0.5336234347371e+00,
7257 0.2876972310953e-10, 0.2692638514771e+01, 0.1173197218910e+00,
7258 0.2827488278556e-10, 0.2056052487960e+01, 0.2022531624851e+00,
7259 0.2515028239756e-10, 0.7411863262449e+00, 0.9597935788730e-01,
7260 0.2853033744415e-10, 0.3948481024894e+01, 0.2118763888447e+01 };
7261
7262 /* SSB-to-Sun, T^1, Y */
7263 static final double s1y[] = {
7264 0.8989047573576e-08, 0.5840593672122e+01, 0.4265981595566e+00,
7265 0.7815938401048e-08, 0.1129664707133e+01, 0.2061856251104e+00,
7266 0.7550926713280e-08, 0.6196589104845e+00, 0.2204125344462e+00,
7267 0.6056556925895e-08, 0.1677494667846e+01, 0.1059381944224e+01,
7268 0.5734142698204e-08, 0.4000920852962e+01, 0.5225775174439e+00,
7269 0.5614341822459e-08, 0.3486722577328e+01, 0.5368044267797e+00,
7270 0.1028678147656e-08, 0.1877141024787e+01, 0.7113454667900e-02,
7271 0.7270792075266e-09, 0.5077167301739e+01, 0.6398972393349e+00,
7272 0.8734141726040e-09, 0.9069550282609e-01, 0.4194847048887e+00,
7273 0.5377371402113e-09, 0.6039381844671e+01, 0.4337116142245e+00,
7274
7275 0.4729719431571e-09, 0.2153086311760e+01, 0.2132990797783e+00,
7276 0.4458052820973e-09, 0.5059830025565e+01, 0.5296909721118e+00,
7277 0.4406855467908e-09, 0.2027971692630e+01, 0.1589072916335e+01,
7278 0.3101659310977e-09, 0.3317677981860e+01, 0.1052268489556e+01,
7279 0.3016749232545e-09, 0.3913703482532e+01, 0.1066495398892e+01,
7280 0.3198541352656e-09, 0.1275513098525e+01, 0.1495633313810e+00,
7281 0.2142065389871e-09, 0.5301351614597e+01, 0.3163918923335e+00,
7282 0.1902615247592e-09, 0.4894943352736e+00, 0.2275259891141e+00,
7283 0.1613410990871e-09, 0.2449891130437e+01, 0.1102062672231e+00,
7284 0.1576992165097e-09, 0.4211421447633e+01, 0.7626583626240e-01,
7285
7286 0.1241637259894e-09, 0.4140803368133e+01, 0.5154640627760e+00,
7287 0.1313974830355e-09, 0.3591920305503e+01, 0.3664874755930e-01,
7288 0.1181697118258e-09, 0.1506314382788e+01, 0.6327837846670e+00,
7289 0.1238239742779e-09, 0.7461405378404e+00, 0.3961708870310e-01,
7290 0.1010107068241e-09, 0.6271010795475e+00, 0.7329749511860e-01,
7291 0.9226316616509e-10, 0.1259158839583e+01, 0.1990721704425e+00,
7292 0.8664946419555e-10, 0.3353244696934e+01, 0.5439178814476e+00,
7293 0.7757230468978e-10, 0.1447677295196e+01, 0.9491756770005e+00,
7294 0.7693168628139e-10, 0.1120509896721e+01, 0.1030928125552e+00,
7295 0.5487897454612e-10, 0.4439380426795e+01, 0.8531963191132e+00,
7296
7297 0.5196118677218e-10, 0.3788856619137e+00, 0.2093666171530e+00,
7298 0.5110853339935e-10, 0.1386879372016e+01, 0.2172315424036e+00,
7299 0.5027804534813e-10, 0.1647881805466e+00, 0.2164800718209e+00,
7300 0.4922485922674e-10, 0.1594315079862e+01, 0.2101180877357e+00,
7301 0.6155599524400e-10, 0.0000000000000e+00, 0.0000000000000e+00,
7302 0.4447147832161e-10, 0.5480720918976e+01, 0.3235053470014e+00,
7303 0.4144691276422e-10, 0.1931371033660e+01, 0.6373574839730e-01,
7304 0.4099950625452e-10, 0.5229611294335e+01, 0.6470106940028e+00,
7305 0.5060541682953e-10, 0.1731112486298e+01, 0.1422690933580e-01,
7306 0.4293615946300e-10, 0.2714571038925e+01, 0.7358765972222e+00,
7307
7308 0.3545659845763e-10, 0.4451041444634e+01, 0.5265099800692e+00,
7309 0.3479112041196e-10, 0.3029385448081e+01, 0.5328719641544e+00,
7310 0.3438516493570e-10, 0.2778507143731e+01, 0.8582758298370e-01,
7311 0.3297341285033e-10, 0.7898709807584e+00, 0.1104591729320e-01,
7312 0.2972585818015e-10, 0.3218785316973e+01, 0.5257585094865e+00,
7313 0.2931707295017e-10, 0.4260731012098e+01, 0.5336234347371e+00,
7314 0.2897198149403e-10, 0.1120753978101e+01, 0.1173197218910e+00,
7315 0.2832293240878e-10, 0.4597682717827e+00, 0.2022531624851e+00,
7316 0.2864348326612e-10, 0.2169939928448e+01, 0.9597935788730e-01,
7317 0.2852714675471e-10, 0.2377659870578e+01, 0.2118763888447e+01 };
7318
7319 /* SSB-to-Sun, T^1, Z */
7320 static final double s1z[] = {
7321 0.5444220475678e-08, 0.1803825509310e+01, 0.2132990797783e+00,
7322 0.3883412695596e-08, 0.4668616389392e+01, 0.5296909721118e+00,
7323 0.1334341434551e-08, 0.0000000000000e+00, 0.0000000000000e+00,
7324 0.3730001266883e-09, 0.5401405918943e+01, 0.2061856251104e+00,
7325 0.2894929197956e-09, 0.4932415609852e+01, 0.2204125344462e+00,
7326 0.2857950357701e-09, 0.3154625362131e+01, 0.7478166569050e-01,
7327 0.2499226432292e-09, 0.3657486128988e+01, 0.4265981595566e+00,
7328 0.1937705443593e-09, 0.5740434679002e+01, 0.1059381944224e+01,
7329 0.1374894396320e-09, 0.1712857366891e+01, 0.5368044267797e+00,
7330 0.1217248678408e-09, 0.2312090870932e+01, 0.5225775174439e+00,
7331
7332 0.7961052740870e-10, 0.5283368554163e+01, 0.3813291813120e-01,
7333 0.4979225949689e-10, 0.4298290471860e+01, 0.4194847048887e+00,
7334 0.4388552286597e-10, 0.6145515047406e+01, 0.7113454667900e-02,
7335 0.2586835212560e-10, 0.3019448001809e+01, 0.6398972393349e+00 };
7336
7337 /* SSB-to-Sun, T^2, X */
7338 static final double s2x[] = {
7339 0.1603551636587e-11, 0.4404109410481e+01, 0.2061856251104e+00,
7340 0.1556935889384e-11, 0.4818040873603e+00, 0.2204125344462e+00,
7341 0.1182594414915e-11, 0.9935762734472e+00, 0.5225775174439e+00,
7342 0.1158794583180e-11, 0.3353180966450e+01, 0.5368044267797e+00,
7343 0.9597358943932e-12, 0.5567045358298e+01, 0.2132990797783e+00,
7344 0.6511516579605e-12, 0.5630872420788e+01, 0.4265981595566e+00,
7345 0.7419792747688e-12, 0.2156188581957e+01, 0.5296909721118e+00,
7346 0.3951972655848e-12, 0.1981022541805e+01, 0.1059381944224e+01,
7347 0.4478223877045e-12, 0.0000000000000e+00, 0.0000000000000e+00 };
7348
7349 /* SSB-to-Sun, T^2, Y */
7350 static final double s2y[] = {
7351 0.1609114495091e-11, 0.2831096993481e+01, 0.2061856251104e+00,
7352 0.1560330784946e-11, 0.5193058213906e+01, 0.2204125344462e+00,
7353 0.1183535479202e-11, 0.5707003443890e+01, 0.5225775174439e+00,
7354 0.1158183066182e-11, 0.1782400404928e+01, 0.5368044267797e+00,
7355 0.1032868027407e-11, 0.4036925452011e+01, 0.2132990797783e+00,
7356 0.6540142847741e-12, 0.4058241056717e+01, 0.4265981595566e+00,
7357 0.7305236491596e-12, 0.6175401942957e+00, 0.5296909721118e+00,
7358 -0.5580725052968e-12, 0.0000000000000e+00, 0.0000000000000e+00,
7359 0.3946122651015e-12, 0.4108265279171e+00, 0.1059381944224e+01 };
7360
7361 /* SSB-to-Sun, T^2, Z */
7362 static final double s2z[] = {
7363 0.3749920358054e-12, 0.3230285558668e+01, 0.2132990797783e+00,
7364 0.2735037220939e-12, 0.6154322683046e+01, 0.5296909721118e+00 };
7365 }
7366
7367 /**
7368 * Earth position and velocity, heliocentric and barycentric, with
7369 * respect to the Barycentric Celestial Reference System.
7370 *
7371 *<p>This function is derived from the International Astronomical Union's
7372 * SOFA (Standards Of Fundamental Astronomy) software collection.
7373 *
7374 *<p>Status: support function.
7375 *
7376 *<!-- Given: -->
7377 * @param date1 double TDB date (Note 1)
7378 * @param date2 double TDB date (Note 1)
7379 *
7380 *<!-- Returned: -->
7381 * @param pvh double[2][3] <u>returned</u> heliocentric Earth position/velocity (au, au/d)
7382 * @param pvb double[2][3] <u>returned</u> barycentric Earth position/velocity (au, au/d)
7383 *
7384 * <!-- Returned (function value): -->
7385 * @return int status: 0 = OK
7386 * +1 = warning: date outside
7387 * the range 1900-2100 AD
7388 *
7389 * <p>Notes:
7390 * <ol>
7391 *
7392 * <li> The TDB date date1+date2 is a Julian Date, apportioned in any
7393 * convenient way between the two arguments. For example,
7394 * JD(TDB)=2450123.7 could be expressed in any of these ways, among
7395 * others:
7396 *<pre>
7397 * date1 date2
7398 *
7399 * 2450123.7 0.0 (JD method)
7400 * 2451545.0 -1421.3 (J2000 method)
7401 * 2400000.5 50123.2 (MJD method)
7402 * 2450123.5 0.2 (date & time method)
7403 *</pre>
7404 * The JD method is the most natural and convenient to use in cases
7405 * where the loss of several decimal digits of resolution is
7406 * acceptable. The J2000 method is best matched to the way the
7407 * argument is handled internally and will deliver the optimum
7408 * resolution. The MJD method and the date & time methods are both
7409 * good compromises between resolution and convenience. However,
7410 * the accuracy of the result is more likely to be limited by the
7411 * algorithm itself than the way the date has been expressed.
7412 *
7413 * n.b. TT can be used instead of TDB in most applications.
7414 *
7415 * <li> On return, the arrays pvh and pvb contain the following:
7416 *
7417 * pvh[0][0] x }
7418 * pvh[0][1] y } heliocentric position, au
7419 * pvh[0][2] z }
7420 *
7421 * pvh[1][0] xdot }
7422 * pvh[1][1] ydot } heliocentric velocity, au/d
7423 * pvh[1][2] zdot }
7424 *
7425 * pvb[0][0] x }
7426 * pvb[0][1] y } barycentric position, au
7427 * pvb[0][2] z }
7428 *
7429 * pvb[1][0] xdot }
7430 * pvb[1][1] ydot } barycentric velocity, au/d
7431 * pvb[1][2] zdot }
7432 *
7433 * The vectors are with respect to the Barycentric Celestial
7434 * Reference System. The time unit is one day in TDB.
7435 *
7436 * <li> The function is a SIMPLIFIED SOLUTION from the planetary theory
7437 * VSOP2000 (X. Moisson, P. Bretagnon, 2001, Celes. Mechanics &
7438 * Dyn. Astron., 80, 3/4, 205-213) and is an adaptation of original
7439 * Fortran code supplied by P. Bretagnon (private comm., 2000).
7440 *
7441 * <li> Comparisons over the time span 1900-2100 with this simplified
7442 * solution and the JPL DE405 ephemeris give the following results:
7443 *
7444 * RMS max
7445 * Heliocentric:
7446 * position error 3.7 11.2 km
7447 * velocity error 1.4 5.0 mm/s
7448 *
7449 * Barycentric:
7450 * position error 4.6 13.4 km
7451 * velocity error 1.4 4.9 mm/s
7452 *
7453 * Comparisons with the JPL DE406 ephemeris show that by 1800 and
7454 * 2200 the position errors are approximately double their 1900-2100
7455 * size. By 1500 and 2500 the deterioration is a factor of 10 and
7456 * by 1000 and 3000 a factor of 60. The velocity accuracy falls off
7457 * at about half that rate.
7458 *
7459 * <li> It is permissible to use the same array for pvh and pvb, which
7460 * will receive the barycentric values.
7461 *</ol>
7462 *@version 2008 November 18
7463 *
7464 * @since Release 20101201
7465 *
7466 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
7467 */
7468 public static int jauEpv00(final double date1, final double date2,
7469 double pvh[][], double pvb[][])
7470 {
7471 /*
7472 * Matrix elements for orienting the analytical model to DE405.
7473 *
7474 * The corresponding Euler angles are:
7475 *
7476 * d ' "
7477 * 1st rotation - 23 26 21.4091 about the x-axis (obliquity)
7478 * 2nd rotation + 0.0475 about the z-axis (RA offset)
7479 *
7480 * These were obtained empirically, by comparisons with DE405 over
7481 * 1900-2100.
7482 */
7483 final double am12 = 0.000000211284,
7484 am13 = -0.000000091603,
7485 am21 = -0.000000230286,
7486 am22 = 0.917482137087,
7487 am23 = -0.397776982902,
7488 am32 = 0.397776982902,
7489 am33 = 0.917482137087;
7490
7491
7492
7493
7494 /* Pointers to coefficient arrays, in x,y,z sets */
7495 final double ce0[][] = { Ephemeris.e0x, Ephemeris.e0y, Ephemeris.e0z },
7496 ce1[][] = { Ephemeris.e1x, Ephemeris.e1y, Ephemeris.e1z },
7497 ce2[][] = { Ephemeris.e2x, Ephemeris.e2y, Ephemeris.e2z },
7498 cs0[][] = { Ephemeris.s0x, Ephemeris.s0y, Ephemeris.s0z },
7499 cs1[][] = { Ephemeris.s1x, Ephemeris.s1y, Ephemeris.s1z },
7500 cs2[][] = { Ephemeris.s2x, Ephemeris.s2y, Ephemeris.s2z };
7501 /* Numbers of terms for each component of the model, in x,y,z sets */
7502 final int ne0[] = {Ephemeris.e0x.length/3,
7503 Ephemeris.e0y.length/3,
7504 Ephemeris.e0z.length/3 },
7505 ne1[] = {Ephemeris.e1x.length/3,
7506 Ephemeris.e1y.length/3,
7507 Ephemeris.e1z.length/3 },
7508 ne2[] = {Ephemeris.e2x.length/3,
7509 Ephemeris.e2y.length/3,
7510 Ephemeris.e2z.length/3 },
7511 ns0[] = {Ephemeris.s0x.length/3,
7512 Ephemeris.s0y.length/3,
7513 Ephemeris.s0z.length/3 },
7514 ns1[] = {Ephemeris.s1x.length/3,
7515 Ephemeris.s1y.length/3,
7516 Ephemeris.s1z.length/3 },
7517 ns2[] = {Ephemeris.s2x.length/3,
7518 Ephemeris.s2y.length/3,
7519 Ephemeris.s2z.length/3 };
7520 int nterms;
7521
7522 /* Miscellaneous */
7523 int jstat, i, j;
7524 double t, t2, xyz, xyzd, a, b, c, ct, p, cp,
7525 ph[] = new double[3], vh[] = new double[3], pb[] = new double[3], vb[] = new double[3], x, y, z;
7526
7527 /*--------------------------------------------------------------------*/
7528
7529 /* Time since reference epoch, Julian years. */
7530 t = ((date1 - DJ00) + date2) / DJY;
7531 t2 = t*t;
7532
7533 /* Set status. */
7534 jstat = abs(t) <= 100.0 ? 0 : 1;
7535
7536 /* X then Y then Z. */
7537 for (i = 0; i < 3; i++) {
7538
7539 /* Initialize position and velocity component. */
7540 xyz = 0.0;
7541 xyzd = 0.0;
7542
7543 /* ------------------------------------------------ */
7544 /* Obtain component of Sun to Earth ecliptic vector */
7545 /* ------------------------------------------------ */
7546
7547 /* Sun to Earth, T^0 terms. */
7548 nterms = ne0[i];
7549 int idx;
7550 for (j = 0, idx=0; j < nterms; j++) {
7551 a = ce0[i][idx++];
7552 b = ce0[i][idx++];
7553 c = ce0[i][idx++];
7554 p = b + c*t;
7555 xyz += a*cos(p);
7556 xyzd -= a*c*sin(p);
7557 }
7558
7559 /* Sun to Earth, T^1 terms. */
7560 nterms = ne1[i];
7561 for (j = 0, idx= 0; j < nterms; j++) {
7562 a = ce1[i][idx++];
7563 b = ce1[i][idx++];
7564 c = ce1[i][idx++];
7565 ct = c*t;
7566 p = b + ct;
7567 cp = cos(p);
7568 xyz += a*t*cp;
7569 xyzd += a*( cp - ct*sin(p) );
7570 }
7571
7572 /* Sun to Earth, T^2 terms. */
7573 nterms = ne2[i];
7574 for (j = 0, idx = 0; j < nterms; j++) {
7575 a = ce2[i][idx++];
7576 b = ce2[i][idx++];
7577 c = ce2[i][idx++];
7578 ct = c*t;
7579 p = b + ct;
7580 cp = cos(p);
7581 xyz += a*t2*cp;
7582 xyzd += a*t*( 2.0*cp - ct*sin(p) );
7583 }
7584
7585 /* Heliocentric Earth position and velocity component. */
7586 ph[i] = xyz;
7587 vh[i] = xyzd / DJY;
7588
7589 /* ------------------------------------------------ */
7590 /* Obtain component of SSB to Earth ecliptic vector */
7591 /* ------------------------------------------------ */
7592
7593 /* SSB to Sun, T^0 terms. */
7594 nterms = ns0[i];
7595 for (j = 0, idx = 0; j < nterms; j++) {
7596 a = cs0[i][idx++];
7597 b = cs0[i][idx++];
7598 c = cs0[i][idx++];
7599 p = b + c*t;
7600 xyz += a*cos(p);
7601 xyzd -= a*c*sin(p);
7602 }
7603
7604 /* SSB to Sun, T^1 terms. */
7605 nterms = ns1[i];
7606 for (j = 0, idx = 0; j < nterms; j++) {
7607 a = cs1[i][idx++];
7608 b = cs1[i][idx++];
7609 c = cs1[i][idx++];
7610 ct = c*t;
7611 p = b + ct;
7612 cp = cos(p);
7613 xyz += a*t*cp;
7614 xyzd += a*(cp - ct*sin(p));
7615 }
7616
7617 /* SSB to Sun, T^2 terms. */
7618 nterms = ns2[i];
7619 for (j = 0, idx = 0; j < nterms; j++) {
7620 a = cs2[i][idx++];
7621 b = cs2[i][idx++];
7622 c = cs2[i][idx++];
7623 ct = c*t;
7624 p = b + ct;
7625 cp = cos(p);
7626 xyz += a*t2*cp;
7627 xyzd += a*t*(2.0*cp - ct*sin(p));
7628 }
7629
7630 /* Barycentric Earth position and velocity component. */
7631 pb[i] = xyz;
7632 vb[i] = xyzd / DJY;
7633
7634 /* Next Cartesian component. */
7635 }
7636
7637 /* Rotate from ecliptic to BCRS coordinates. */
7638
7639 x = ph[0];
7640 y = ph[1];
7641 z = ph[2];
7642 pvh[0][0] = x + am12*y + am13*z;
7643 pvh[0][1] = am21*x + am22*y + am23*z;
7644 pvh[0][2] = am32*y + am33*z;
7645
7646 x = vh[0];
7647 y = vh[1];
7648 z = vh[2];
7649 pvh[1][0] = x + am12*y + am13*z;
7650 pvh[1][1] = am21*x + am22*y + am23*z;
7651 pvh[1][2] = am32*y + am33*z;
7652
7653 x = pb[0];
7654 y = pb[1];
7655 z = pb[2];
7656 pvb[0][0] = x + am12*y + am13*z;
7657 pvb[0][1] = am21*x + am22*y + am23*z;
7658 pvb[0][2] = am32*y + am33*z;
7659
7660 x = vb[0];
7661 y = vb[1];
7662 z = vb[2];
7663 pvb[1][0] = x + am12*y + am13*z;
7664 pvb[1][1] = am21*x + am22*y + am23*z;
7665 pvb[1][2] = am32*y + am33*z;
7666
7667 /* Return the status. */
7668 return jstat;
7669
7670 }
7671
7672
7673 /**
7674 * Equation of the equinoxes, IAU 1994 model.
7675 *
7676 *<p>This function is derived from the International Astronomical Union's
7677 * SOFA (Standards Of Fundamental Astronomy) software collection.
7678 *
7679 *<p>Status: canonical model.
7680 *
7681 *<!-- Given: -->
7682 * @param date1 double TDB date (Note 1)
7683 * @param date2 double TDB date (Note 1)
7684 *
7685 * <!-- Returned (function value): -->
7686 * @return double equation of the equinoxes (Note 2)
7687 *
7688 * <p>Notes:
7689 * <ol>
7690 *
7691 * <li> The date date1+date2 is a Julian Date, apportioned in any
7692 * convenient way between the two arguments. For example,
7693 * JD(TT)=2450123.7 could be expressed in any of these ways,
7694 * among others:
7695 *<pre>
7696 * date1 date2
7697 *
7698 * 2450123.7 0.0 (JD method)
7699 * 2451545.0 -1421.3 (J2000 method)
7700 * 2400000.5 50123.2 (MJD method)
7701 * 2450123.5 0.2 (date & time method)
7702 *</pre>
7703 * The JD method is the most natural and convenient to use in
7704 * cases where the loss of several decimal digits of resolution
7705 * is acceptable. The J2000 method is best matched to the way
7706 * the argument is handled internally and will deliver the
7707 * optimum resolution. The MJD method and the date & time methods
7708 * are both good compromises between resolution and convenience.
7709 *
7710 * <li> The result, which is in radians, operates in the following sense:
7711 *
7712 * Greenwich apparent ST = GMST + equation of the equinoxes
7713 *</ol>
7714 *<p>Called:<ul>
7715 * <li>{@link #jauNut80} nutation, IAU 1980
7716 * <li>{@link #jauObl80} mean obliquity, IAU 1980
7717 * </ul>
7718 *<p>References:
7719 *
7720 * <p>IAU Resolution C7, Recommendation 3 (1994).
7721 *
7722 * <p>Capitaine, N. & Gontier, A.-M., 1993, Astron. Astrophys., 275,
7723 * 645-650.
7724 *
7725 *@version 2008 May 24
7726 *
7727 * @since Release 20101201
7728 *
7729 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
7730 */
7731 public static double jauEqeq94(double date1, double date2)
7732 {
7733 double t, om, eps0, ee;
7734
7735
7736 /* Interval between fundamental epoch J2000.0 and given date (JC). */
7737 t = ((date1 - DJ00) + date2) / DJC;
7738
7739 /* Longitude of the mean ascending node of the lunar orbit on the */
7740 /* ecliptic, measured from the mean equinox of date. */
7741 om = jauAnpm((450160.280 + (-482890.539
7742 + (7.455 + 0.008 * t) * t) * t) * DAS2R
7743 + fmod(-5.0 * t, 1.0) * D2PI);
7744
7745 /* Nutation components and mean obliquity. */
7746 NutationTerms nt = jauNut80(date1, date2);
7747 eps0 = jauObl80(date1, date2);
7748
7749 /* Equation of the equinoxes. */
7750 ee = nt.dpsi*cos(eps0) + DAS2R*(0.00264*sin(om) + 0.000063*sin(om+om));
7751
7752 return ee;
7753
7754 }
7755
7756
7757 /**
7758 * Earth rotation angle (IAU 2000 model).
7759 *
7760 *<p>This function is derived from the International Astronomical Union's
7761 * SOFA (Standards Of Fundamental Astronomy) software collection.
7762 *
7763 *<p>Status: canonical model.
7764 *
7765 *<!-- Given: -->
7766 * @param dj1 double UT1 as a 2-part Julian Date (see note)
7767 * @param dj2 double UT1 as a 2-part Julian Date (see note)
7768 *
7769 * <!-- Returned (function value): -->
7770 * @return double Earth rotation angle (radians), range 0-2pi
7771 *
7772 * <p>Notes:
7773 * <ol>
7774 *
7775 * <li> The UT1 date dj1+dj2 is a Julian Date, apportioned in any
7776 * convenient way between the arguments dj1 and dj2. For example,
7777 * JD(UT1)=2450123.7 could be expressed in any of these ways,
7778 * among others:
7779 *<pre>
7780 * dj1 dj2
7781 *
7782 * 2450123.7 0.0 (JD method)
7783 * 2451545.0 -1421.3 (J2000 method)
7784 * 2400000.5 50123.2 (MJD method)
7785 * 2450123.5 0.2 (date & time method)
7786 *</pre>
7787 * The JD method is the most natural and convenient to use in
7788 * cases where the loss of several decimal digits of resolution
7789 * is acceptable. The J2000 and MJD methods are good compromises
7790 * between resolution and convenience. The date & time method is
7791 * best matched to the algorithm used: maximum precision is
7792 * delivered when the dj1 argument is for 0hrs UT1 on the day in
7793 * question and the dj2 argument lies in the range 0 to 1, or vice
7794 * versa.
7795 *
7796 * <li> The algorithm is adapted from Expression 22 of Capitaine et al.
7797 * 2000. The time argument has been expressed in days directly,
7798 * and, to retain precision, integer contributions have been
7799 * eliminated. The same formulation is given in IERS Conventions
7800 * (2003), Chap. 5, Eq. 14.
7801 *</ol>
7802 *<p>Called:<ul>
7803 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
7804 * </ul>
7805 *<p>References:
7806 *
7807 * <p>Capitaine N., Guinot B. and McCarthy D.D, 2000, Astron.
7808 * Astrophys., 355, 398-405.
7809 *
7810 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
7811 * IERS Technical Note No. 32, BKG (2004)
7812 *
7813 *@version 2008 May 24
7814 *
7815 * @since Release 20101201
7816 *
7817 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
7818 */
7819 public static double jauEra00(double dj1, double dj2)
7820 {
7821 double d1, d2, t, f, theta;
7822
7823
7824 /* Days since fundamental epoch. */
7825 if (dj1 < dj2) {
7826 d1 = dj1;
7827 d2 = dj2;
7828 } else {
7829 d1 = dj2;
7830 d2 = dj1;
7831 }
7832 t = d1 + (d2- DJ00);
7833
7834 /* Fractional part of T (days). */
7835 f = fmod(d1, 1.0) + fmod(d2, 1.0);
7836
7837 /* Earth rotation angle at this UT1. */
7838 theta = jauAnp(D2PI * (f + 0.7790572732640
7839 + 0.00273781191135448 * t));
7840
7841 return theta;
7842
7843 }
7844
7845
7846 /**
7847 * Fundamental argument, IERS Conventions (2003):
7848 * mean elongation of the Moon from the Sun.
7849 *
7850 *<p>This function is derived from the International Astronomical Union's
7851 * SOFA (Standards Of Fundamental Astronomy) software collection.
7852 *
7853 *<p>Status: canonical model.
7854 *
7855 *<!-- Given: -->
7856 * @param t double TDB, Julian centuries since J2000.0 (Note 1)
7857 *
7858 * <!-- Returned (function value): -->
7859 * @return double D, radians (Note 2)
7860 *
7861 * <p>Notes:
7862 * <ol>
7863 *
7864 * <li> Though t is strictly TDB, it is usually more convenient to use
7865 * TT, which makes no significant difference.
7866 *
7867 * <li> The expression used is as adopted in IERS Conventions (2003) and
7868 * is from Simon et al. (1994).
7869 *</ol>
7870 *<p>References:
7871 *
7872 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
7873 * IERS Technical Note No. 32, BKG (2004)
7874 *
7875 * <p>Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
7876 * Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
7877 *
7878 *@version 2009 December 16
7879 *
7880 * @since Release 20101201
7881 *
7882 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
7883 */
7884 public static double jauFad03(double t)
7885 {
7886 double a;
7887
7888
7889 /* Mean elongation of the Moon from the Sun (IERS Conventions 2003). */
7890 a = fmod( 1072260.703692 +
7891 t * ( 1602961601.2090 +
7892 t * ( - 6.3706 +
7893 t * ( 0.006593 +
7894 t * ( - 0.00003169 ) ) ) ), TURNAS ) * DAS2R;
7895
7896 return a;
7897
7898 }
7899
7900
7901 /**
7902 * Fundamental argument, IERS Conventions (2003):
7903 * mean longitude of Earth.
7904 *
7905 *<p>This function is derived from the International Astronomical Union's
7906 * SOFA (Standards Of Fundamental Astronomy) software collection.
7907 *
7908 *<p>Status: canonical model.
7909 *
7910 *<!-- Given: -->
7911 * @param t double TDB, Julian centuries since J2000.0 (Note 1)
7912 *
7913 * <!-- Returned (function value): -->
7914 * @return double mean longitude of Earth, radians (Note 2)
7915 *
7916 * <p>Notes:
7917 * <ol>
7918 *
7919 * <li> Though t is strictly TDB, it is usually more convenient to use
7920 * TT, which makes no significant difference.
7921 *
7922 * <li> The expression used is as adopted in IERS Conventions (2003) and
7923 * comes from Souchay et al. (1999) after Simon et al. (1994).
7924 *</ol>
7925 *<p>References:
7926 *
7927 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
7928 * IERS Technical Note No. 32, BKG (2004)
7929 *
7930 * <p>Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
7931 * Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
7932 *
7933 * <p>Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
7934 * Astron.Astrophys.Supp.Ser. 135, 111
7935 *
7936 *@version 2009 December 16
7937 *
7938 * @since Release 20101201
7939 *
7940 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
7941 */
7942 public static double jauFae03(double t)
7943 {
7944 double a;
7945
7946
7947 /* Mean longitude of Earth (IERS Conventions 2003). */
7948 a = fmod(1.753470314 + 628.3075849991 * t, D2PI);
7949
7950 return a;
7951
7952 }
7953
7954
7955 /**
7956 * Fundamental argument, IERS Conventions (2003):
7957 * mean longitude of the Moon minus mean longitude of the ascending
7958 * node.
7959 *
7960 *<p>This function is derived from the International Astronomical Union's
7961 * SOFA (Standards Of Fundamental Astronomy) software collection.
7962 *
7963 *<p>Status: canonical model.
7964 *
7965 *<!-- Given: -->
7966 * @param t double TDB, Julian centuries since J2000.0 (Note 1)
7967 *
7968 * <!-- Returned (function value): -->
7969 * @return double F, radians (Note 2)
7970 *
7971 * <p>Notes:
7972 * <ol>
7973 *
7974 * <li> Though t is strictly TDB, it is usually more convenient to use
7975 * TT, which makes no significant difference.
7976 *
7977 * <li> The expression used is as adopted in IERS Conventions (2003) and
7978 * is from Simon et al. (1994).
7979 *</ol>
7980 *<p>References:
7981 *
7982 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
7983 * IERS Technical Note No. 32, BKG (2004)
7984 *
7985 * Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
7986 * Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
7987 *
7988 *@version 2009 December 16
7989 *
7990 * @since Release 20101201
7991 *
7992 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
7993 */
7994 public static double jauFaf03(double t)
7995 {
7996 double a;
7997
7998
7999 /* Mean longitude of the Moon minus that of the ascending node */
8000 /* (IERS Conventions 2003). */
8001 a = fmod( 335779.526232 +
8002 t * ( 1739527262.8478 +
8003 t * ( - 12.7512 +
8004 t * ( - 0.001037 +
8005 t * ( 0.00000417 ) ) ) ), TURNAS ) * DAS2R;
8006
8007 return a;
8008
8009
8010 }
8011
8012
8013 /**
8014 * Fundamental argument, IERS Conventions (2003):
8015 * mean longitude of Jupiter.
8016 *
8017 *<p>This function is derived from the International Astronomical Union's
8018 * SOFA (Standards Of Fundamental Astronomy) software collection.
8019 *
8020 *<p>Status: canonical model.
8021 *
8022 *<!-- Given: -->
8023 * @param t double TDB, Julian centuries since J2000.0 (Note 1)
8024 *
8025 * <!-- Returned (function value): -->
8026 * @return double mean longitude of Jupiter, radians (Note 2)
8027 *
8028 * <p>Notes:
8029 * <ol>
8030 *
8031 * <li> Though t is strictly TDB, it is usually more convenient to use
8032 * TT, which makes no significant difference.
8033 *
8034 * <li> The expression used is as adopted in IERS Conventions (2003) and
8035 * comes from Souchay et al. (1999) after Simon et al. (1994).
8036 *</ol>
8037 *<p>References:
8038 *
8039 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8040 * IERS Technical Note No. 32, BKG (2004)
8041 *
8042 * <p>Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8043 * Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8044 *
8045 * <p>Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
8046 * Astron.Astrophys.Supp.Ser. 135, 111
8047 *
8048 *@version 2009 December 16
8049 *
8050 * @since Release 20101201
8051 *
8052 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
8053 */
8054 public static double jauFaju03(double t)
8055 {
8056 double a;
8057
8058
8059 /* Mean longitude of Jupiter (IERS Conventions 2003). */
8060 a = fmod(0.599546497 + 52.9690962641 * t, D2PI);
8061
8062 return a;
8063
8064 }
8065
8066
8067 /**
8068 * Fundamental argument, IERS Conventions (2003):
8069 * mean anomaly of the Moon.
8070 *
8071 *<p>This function is derived from the International Astronomical Union's
8072 * SOFA (Standards Of Fundamental Astronomy) software collection.
8073 *
8074 *<p>Status: canonical model.
8075 *
8076 *<!-- Given: -->
8077 * @param t double TDB, Julian centuries since J2000.0 (Note 1)
8078 *
8079 * <!-- Returned (function value): -->
8080 * @return double l, radians (Note 2)
8081 *
8082 * <p>Notes:
8083 * <ol>
8084 *
8085 * <li> Though t is strictly TDB, it is usually more convenient to use
8086 * TT, which makes no significant difference.
8087 *
8088 * <li> The expression used is as adopted in IERS Conventions (2003) and
8089 * is from Simon et al. (1994).
8090 *</ol>
8091 *<p>References:
8092 *
8093 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8094 * IERS Technical Note No. 32, BKG (2004)
8095 *
8096 * Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8097 * Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8098 *
8099 *@version 2009 December 16
8100 *
8101 * @since Release 20101201
8102 *
8103 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
8104 */
8105 public static double jauFal03(double t)
8106 {
8107 double a;
8108
8109
8110 /* Mean anomaly of the Moon (IERS Conventions 2003). */
8111 a = fmod( 485868.249036 +
8112 t * ( 1717915923.2178 +
8113 t * ( 31.8792 +
8114 t * ( 0.051635 +
8115 t * ( - 0.00024470 ) ) ) ), TURNAS ) * DAS2R;
8116
8117 return a;
8118
8119 }
8120
8121
8122 /**
8123 * Fundamental argument, IERS Conventions (2003):
8124 * mean anomaly of the Sun.
8125 *
8126 *<p>This function is derived from the International Astronomical Union's
8127 * SOFA (Standards Of Fundamental Astronomy) software collection.
8128 *
8129 *<p>Status: canonical model.
8130 *
8131 *<!-- Given: -->
8132 * @param t double TDB, Julian centuries since J2000.0 (Note 1)
8133 *
8134 * <!-- Returned (function value): -->
8135 * @return double l', radians (Note 2)
8136 *
8137 * <p>Notes:
8138 * <ol>
8139 *
8140 * <li> Though t is strictly TDB, it is usually more convenient to use
8141 * TT, which makes no significant difference.
8142 *
8143 * <li> The expression used is as adopted in IERS Conventions (2003) and
8144 * is from Simon et al. (1994).
8145 *</ol>
8146 *<p>References:
8147 *
8148 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8149 * IERS Technical Note No. 32, BKG (2004)
8150 *
8151 * Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8152 * Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8153 *
8154 *@version 2009 December 16
8155 *
8156 * @since Release 20101201
8157 *
8158 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
8159 */
8160 public static double jauFalp03(double t)
8161 {
8162 double a;
8163
8164
8165 /* Mean anomaly of the Sun (IERS Conventions 2003). */
8166 a = fmod( 1287104.793048 +
8167 t * ( 129596581.0481 +
8168 t * ( - 0.5532 +
8169 t * ( 0.000136 +
8170 t * ( - 0.00001149 ) ) ) ), TURNAS ) * DAS2R;
8171
8172 return a;
8173
8174 }
8175
8176
8177 /**
8178 * Fundamental argument, IERS Conventions (2003):
8179 * mean longitude of Mars.
8180 *
8181 *<p>This function is derived from the International Astronomical Union's
8182 * SOFA (Standards Of Fundamental Astronomy) software collection.
8183 *
8184 *<p>Status: canonical model.
8185 *
8186 *<!-- Given: -->
8187 * @param t double TDB, Julian centuries since J2000.0 (Note 1)
8188 *
8189 * <!-- Returned (function value): -->
8190 * @return double mean longitude of Mars, radians (Note 2)
8191 *
8192 * <p>Notes:
8193 * <ol>
8194 *
8195 * <li> Though t is strictly TDB, it is usually more convenient to use
8196 * TT, which makes no significant difference.
8197 *
8198 * <li> The expression used is as adopted in IERS Conventions (2003) and
8199 * comes from Souchay et al. (1999) after Simon et al. (1994).
8200 *</ol>
8201 *<p>References:
8202 *
8203 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8204 * IERS Technical Note No. 32, BKG (2004)
8205 *
8206 * Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8207 * Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8208 *
8209 * Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
8210 * Astron.Astrophys.Supp.Ser. 135, 111
8211 *
8212 *@version 2009 December 16
8213 *
8214 * @since Release 20101201
8215 *
8216 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
8217 */
8218 public static double jauFama03(double t)
8219 {
8220 double a;
8221
8222
8223 /* Mean longitude of Mars (IERS Conventions 2003). */
8224 a = fmod(6.203480913 + 334.0612426700 * t, D2PI);
8225
8226 return a;
8227
8228 }
8229
8230
8231 /**
8232 * Fundamental argument, IERS Conventions (2003):
8233 * mean longitude of Mercury.
8234 *
8235 *<p>This function is derived from the International Astronomical Union's
8236 * SOFA (Standards Of Fundamental Astronomy) software collection.
8237 *
8238 *<p>Status: canonical model.
8239 *
8240 *<!-- Given: -->
8241 * @param t double TDB, Julian centuries since J2000.0 (Note 1)
8242 *
8243 * <!-- Returned (function value): -->
8244 * @return double mean longitude of Mercury, radians (Note 2)
8245 *
8246 * <p>Notes:
8247 * <ol>
8248 *
8249 * <li> Though t is strictly TDB, it is usually more convenient to use
8250 * TT, which makes no significant difference.
8251 *
8252 * <li> The expression used is as adopted in IERS Conventions (2003) and
8253 * comes from Souchay et al. (1999) after Simon et al. (1994).
8254 *</ol>
8255 *<p>References:
8256 *
8257 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8258 * IERS Technical Note No. 32, BKG (2004)
8259 *
8260 * Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8261 * Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8262 *
8263 * Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
8264 * Astron.Astrophys.Supp.Ser. 135, 111
8265 *
8266 *@version 2009 December 16
8267 *
8268 * @since Release 20101201
8269 *
8270 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
8271 */
8272 public static double jauFame03(double t)
8273 {
8274 double a;
8275
8276
8277 /* Mean longitude of Mercury (IERS Conventions 2003). */
8278 a = fmod(4.402608842 + 2608.7903141574 * t, D2PI);
8279
8280 return a;
8281
8282 }
8283
8284
8285
8286 /**
8287 * Fundamental argument, IERS Conventions (2003):
8288 * mean longitude of Neptune.
8289 *
8290 *<p>This function is derived from the International Astronomical Union's
8291 * SOFA (Standards Of Fundamental Astronomy) software collection.
8292 *
8293 *<p>Status: canonical model.
8294 *
8295 *<!-- Given: -->
8296 * @param t double TDB, Julian centuries since J2000.0 (Note 1)
8297 *
8298 * <!-- Returned (function value): -->
8299 * @return double mean longitude of Neptune, radians (Note 2)
8300 *
8301 * <p>Notes:
8302 * <ol>
8303 *
8304 * <li> Though t is strictly TDB, it is usually more convenient to use
8305 * TT, which makes no significant difference.
8306 *
8307 * <li> The expression used is as adopted in IERS Conventions (2003) and
8308 * is adapted from Simon et al. (1994).
8309 *</ol>
8310 *<p>References:
8311 *
8312 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8313 * IERS Technical Note No. 32, BKG (2004)
8314 *
8315 * Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8316 * Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8317 *
8318 *@version 2009 December 16
8319 *
8320 * @since Release 20101201
8321 *
8322 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
8323 */
8324 public static double jauFane03(double t)
8325 {
8326 double a;
8327
8328
8329 /* Mean longitude of Neptune (IERS Conventions 2003). */
8330 a = fmod(5.311886287 + 3.8133035638 * t, D2PI);
8331
8332 return a;
8333
8334 }
8335
8336
8337 /**
8338 * Fundamental argument, IERS Conventions (2003):
8339 * mean longitude of the Moon's ascending node.
8340 *
8341 *<p>This function is derived from the International Astronomical Union's
8342 * SOFA (Standards Of Fundamental Astronomy) software collection.
8343 *
8344 *<p>Status: canonical model.
8345 *
8346 *<!-- Given: -->
8347 * @param t double TDB, Julian centuries since J2000.0 (Note 1)
8348 *
8349 * <!-- Returned (function value): -->
8350 * @return double Omega, radians (Note 2)
8351 *
8352 * <p>Notes:
8353 * <ol>
8354 *
8355 * <li> Though t is strictly TDB, it is usually more convenient to use
8356 * TT, which makes no significant difference.
8357 *
8358 * <li> The expression used is as adopted in IERS Conventions (2003) and
8359 * is from Simon et al. (1994).
8360 *</ol>
8361 *<p>References:
8362 *
8363 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8364 * IERS Technical Note No. 32, BKG (2004)
8365 *
8366 * Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8367 * Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8368 *
8369 *@version 2009 December 16
8370 *
8371 * @since Release 20101201
8372 *
8373 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
8374 */
8375 public static double jauFaom03(double t)
8376 {
8377 double a;
8378
8379
8380 /* Mean longitude of the Moon's ascending node */
8381 /* (IERS Conventions 2003). */
8382 a = fmod( 450160.398036 +
8383 t * ( - 6962890.5431 +
8384 t * ( 7.4722 +
8385 t * ( 0.007702 +
8386 t * ( - 0.00005939 ) ) ) ), TURNAS ) * DAS2R;
8387
8388 return a;
8389
8390 }
8391
8392
8393 /**
8394 * Fundamental argument, IERS Conventions (2003):
8395 * general accumulated precession in longitude.
8396 *
8397 *<p>This function is derived from the International Astronomical Union's
8398 * SOFA (Standards Of Fundamental Astronomy) software collection.
8399 *
8400 *<p>Status: canonical model.
8401 *
8402 *<!-- Given: -->
8403 * @param t double TDB, Julian centuries since J2000.0 (Note 1)
8404 *
8405 * <!-- Returned (function value): -->
8406 * @return double general precession in longitude, radians (Note 2)
8407 *
8408 * <p>Notes:
8409 * <ol>
8410 *
8411 * <li> Though t is strictly TDB, it is usually more convenient to use
8412 * TT, which makes no significant difference.
8413 *
8414 * <li> The expression used is as adopted in IERS Conventions (2003). It
8415 * is taken from Kinoshita & Souchay (1990) and comes originally
8416 * from Lieske et al. (1977).
8417 *</ol>
8418 *<p>References:
8419 *
8420 * Kinoshita, H. and Souchay J. 1990, Celest.Mech. and Dyn.Astron.
8421 * 48, 187
8422 *
8423 * <p>Lieske, J.H., Lederle, T., Fricke, W. & Morando, B. 1977,
8424 * Astron.Astrophys. 58, 1-16
8425 *
8426 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8427 * IERS Technical Note No. 32, BKG (2004)
8428 *
8429 *@version 2009 December 16
8430 *
8431 * @since Release 20101201
8432 *
8433 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
8434 */
8435 public static double jauFapa03(double t)
8436 {
8437 double a;
8438
8439
8440 /* General accumulated precession in longitude. */
8441 a = (0.024381750 + 0.00000538691 * t) * t;
8442
8443 return a;
8444
8445 }
8446
8447
8448 /**
8449 * Fundamental argument, IERS Conventions (2003):
8450 * mean longitude of Saturn.
8451 *
8452 *<p>This function is derived from the International Astronomical Union's
8453 * SOFA (Standards Of Fundamental Astronomy) software collection.
8454 *
8455 *<p>Status: canonical model.
8456 *
8457 *<!-- Given: -->
8458 * @param t double TDB, Julian centuries since J2000.0 (Note 1)
8459 *
8460 * <!-- Returned (function value): -->
8461 * @return double mean longitude of Saturn, radians (Note 2)
8462 *
8463 * <p>Notes:
8464 * <ol>
8465 *
8466 * <li> Though t is strictly TDB, it is usually more convenient to use
8467 * TT, which makes no significant difference.
8468 *
8469 * <li> The expression used is as adopted in IERS Conventions (2003) and
8470 * comes from Souchay et al. (1999) after Simon et al. (1994).
8471 *</ol>
8472 *<p>References:
8473 *
8474 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8475 * IERS Technical Note No. 32, BKG (2004)
8476 *
8477 * Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8478 * Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8479 *
8480 * Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
8481 * Astron.Astrophys.Supp.Ser. 135, 111
8482 *
8483 *@version 2009 December 16
8484 *
8485 * @since Release 20101201
8486 *
8487 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
8488 */
8489 public static double jauFasa03(double t)
8490 {
8491 double a;
8492
8493
8494 /* Mean longitude of Saturn (IERS Conventions 2003). */
8495 a = fmod(0.874016757 + 21.3299104960 * t, D2PI);
8496
8497 return a;
8498
8499 }
8500
8501
8502 /**
8503 * Fundamental argument, IERS Conventions (2003):
8504 * mean longitude of Uranus.
8505 *
8506 *<p>This function is derived from the International Astronomical Union's
8507 * SOFA (Standards Of Fundamental Astronomy) software collection.
8508 *
8509 *<p>Status: canonical model.
8510 *
8511 *<!-- Given: -->
8512 * @param t double TDB, Julian centuries since J2000.0 (Note 1)
8513 *
8514 * <!-- Returned (function value): -->
8515 * @return double mean longitude of Uranus, radians (Note 2)
8516 *
8517 * <p>Notes:
8518 * <ol>
8519 *
8520 * <li> Though t is strictly TDB, it is usually more convenient to use
8521 * TT, which makes no significant difference.
8522 *
8523 * <li> The expression used is as adopted in IERS Conventions (2003) and
8524 * is adapted from Simon et al. (1994).
8525 *</ol>
8526 *<p>References:
8527 *
8528 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8529 * IERS Technical Note No. 32, BKG (2004)
8530 *
8531 * Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8532 * Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8533 *
8534 *@version 2009 December 16
8535 *
8536 * @since Release 20101201
8537 *
8538 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
8539 */
8540 public static double jauFaur03(double t)
8541 {
8542 double a;
8543
8544
8545 /* Mean longitude of Uranus (IERS Conventions 2003). */
8546 a = fmod(5.481293872 + 7.4781598567 * t, D2PI);
8547
8548 return a;
8549
8550 }
8551
8552
8553 /**
8554 * Fundamental argument, IERS Conventions (2003):
8555 * mean longitude of Venus.
8556 *
8557 *<p>This function is derived from the International Astronomical Union's
8558 * SOFA (Standards Of Fundamental Astronomy) software collection.
8559 *
8560 *<p>Status: canonical model.
8561 *
8562 *<!-- Given: -->
8563 * @param t double TDB, Julian centuries since J2000.0 (Note 1)
8564 *
8565 * <!-- Returned (function value): -->
8566 * @return double mean longitude of Venus, radians (Note 2)
8567 *
8568 * <p>Notes:
8569 * <ol>
8570 *
8571 * <li> Though t is strictly TDB, it is usually more convenient to use
8572 * TT, which makes no significant difference.
8573 *
8574 * <li> The expression used is as adopted in IERS Conventions (2003) and
8575 * comes from Souchay et al. (1999) after Simon et al. (1994).
8576 *</ol>
8577 *<p>References:
8578 *
8579 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
8580 * IERS Technical Note No. 32, BKG (2004)
8581 *
8582 * Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
8583 * Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
8584 *
8585 * Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
8586 * Astron.Astrophys.Supp.Ser. 135, 111
8587 *
8588 *@version 2009 December 16
8589 *
8590 * @since Release 20101201
8591 *
8592 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
8593 */
8594 public static double jauFave03(double t)
8595 {
8596 double a;
8597
8598
8599 /* Mean longitude of Venus (IERS Conventions 2003). */
8600 a = fmod(3.176146697 + 1021.3285546211 * t, D2PI);
8601
8602 return a;
8603
8604 }
8605
8606
8607 /**
8608 * Transform FK5 (J2000.0) star data into the Hipparcos system.
8609 *
8610 *<p>This function is derived from the International Astronomical Union's
8611 * SOFA (Standards Of Fundamental Astronomy) software collection.
8612 *
8613 *<p>Status: support function.
8614 *
8615 * Given (all FK5, equinox J2000.0, epoch J2000.0):
8616 * @param r5 double RA (radians)
8617 * @param d5 double Dec (radians)
8618 * @param dr5 double proper motion in RA (dRA/dt, rad/Jyear)
8619 * @param dd5 double proper motion in Dec (dDec/dt, rad/Jyear)
8620 * @param px5 double parallax (arcsec)
8621 * @param rv5 double radial velocity (km/s, positive = receding)
8622 *
8623 * Returned (all Hipparcos, epoch J2000.0):
8624 * @return catalogue coordinates
8625 *
8626 * <p>Notes:
8627 * <ol>
8628 *
8629 * <li> This function transforms FK5 star positions and proper motions
8630 * into the system of the Hipparcos catalog.
8631 *
8632 * <li> The proper motions in RA are dRA/dt rather than
8633 * cos(Dec)*dRA/dt, and are per year rather than per century.
8634 *
8635 * <li> The FK5 to Hipparcos transformation is modeled as a pure
8636 * rotation and spin; zonal errors in the FK5 catalog are not
8637 * taken into account.
8638 *
8639 * <li> See also {@link #jauH2fk5}, {@link #jauFk5hz}, {@link #jauHfk5z}.
8640 *</ol>
8641 *<p>Called:<ul>
8642 * <li>{@link #jauStarpv} star catalog data to space motion pv-vector
8643 * <li>{@link #jauFk5hip} FK5 to Hipparcos rotation and spin
8644 * <li>{@link #jauRxp} product of r-matrix and p-vector
8645 * <li>{@link #jauPxp} vector product of two p-vectors
8646 * <li>{@link #jauPpp} p-vector plus p-vector
8647 * <li>{@link #jauPvstar} space motion pv-vector to star catalog data
8648 * </ul>
8649 *<p>Reference:
8650 *
8651 * <p>F.Mignard & M.Froeschle, Astron. Astrophys. 354, 732-739 (2000).
8652 *
8653 *@version 2009 December 17
8654 *
8655 * @since Release 20101201
8656 *
8657 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
8658 */
8659 public static CatalogCoords jauFk52h(double r5, double d5,
8660 double dr5, double dd5, double px5, double rv5)
8661 {
8662 int i;
8663 double pv5[][] = new double[2][3], r5h[][] = new double[3][3], s5h[] = new double[3], wxp[] = new double[3], vv[] = new double[3], pvh[][] = new double[2][3];
8664
8665
8666 /* FK5 barycentric position/velocity pv-vector (normalized). */
8667 jauStarpv(r5, d5, dr5, dd5, px5, rv5, pv5);
8668
8669 /* FK5 to Hipparcos orientation matrix and spin vector. */
8670 jauFk5hip(r5h, s5h);
8671
8672 /* Make spin units per day instead of per year. */
8673 for ( i = 0; i < 3; s5h[i++] /= 365.25 );
8674
8675 /* Orient the FK5 position into the Hipparcos system. */
8676 pvh[0] = jauRxp(r5h, pv5[0]);
8677
8678 /* Apply spin to the position giving an extra space motion component. */
8679 wxp = jauPxp(pv5[0],s5h);
8680
8681 /* Add this component to the FK5 space motion. */
8682 vv = jauPpp(wxp, pv5[1]);
8683
8684 /* Orient the FK5 space motion into the Hipparcos system. */
8685 pvh[1] = jauRxp(r5h, vv);
8686
8687 /* Hipparcos pv-vector to spherical. */
8688 CatalogCoords cat = null;
8689 try {
8690 cat = jauPvstar(pvh);
8691 } catch (JSOFAInternalError e) {
8692 //original code ignored possibility of error too...
8693 e.printStackTrace();
8694 }
8695
8696 return cat;
8697
8698 }
8699
8700
8701 /**
8702 * FK5 to Hipparcos rotation and spin.
8703 *
8704 *<p>This function is derived from the International Astronomical Union's
8705 * SOFA (Standards Of Fundamental Astronomy) software collection.
8706 *
8707 *<p>Status: support function.
8708 *
8709 *<!-- Returned: -->
8710 * @param r5h double[3][3] <u>returned</u> r-matrix: FK5 rotation wrt Hipparcos (Note 2)
8711 * @param s5h double[3] <u>returned</u> r-vector: FK5 spin wrt Hipparcos (Note 3)
8712 *
8713 * <p>Notes:
8714 * <ol>
8715 *
8716 * <li> This function models the FK5 to Hipparcos transformation as a
8717 * pure rotation and spin; zonal errors in the FK5 catalogue are
8718 * not taken into account.
8719 *
8720 * <li> The r-matrix r5h operates in the sense:
8721 *
8722 * P_Hipparcos = r5h x P_FK5
8723 *
8724 * where P_FK5 is a p-vector in the FK5 frame, and P_Hipparcos is
8725 * the equivalent Hipparcos p-vector.
8726 *
8727 * <li> The r-vector s5h represents the time derivative of the FK5 to
8728 * Hipparcos rotation. The units are radians per year (Julian,
8729 * TDB).
8730 *</ol>
8731 *<p>Called:<ul>
8732 * <li>{@link #jauRv2m} r-vector to r-matrix
8733 * </ul>
8734 *<p>Reference:
8735 *
8736 * <p>F.Mignard & M.Froeschle, Astron. Astrophys. 354, 732-739 (2000).
8737 *
8738 *@version 2009 March 14
8739 *
8740 * @since Release 20101201
8741 *
8742 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
8743 */
8744 public static void jauFk5hip(double r5h[][], double s5h[] )
8745 {
8746 double v[] = new double[3];
8747
8748 /* FK5 wrt Hipparcos orientation and spin (radians, radians/year) */
8749 double epx, epy, epz;
8750 double omx, omy, omz;
8751
8752
8753 epx = -19.9e-3 * DAS2R;
8754 epy = -9.1e-3 * DAS2R;
8755 epz = 22.9e-3 * DAS2R;
8756
8757 omx = -0.30e-3 * DAS2R;
8758 omy = 0.60e-3 * DAS2R;
8759 omz = 0.70e-3 * DAS2R;
8760
8761 /* FK5 to Hipparcos orientation expressed as an r-vector. */
8762 v[0] = epx;
8763 v[1] = epy;
8764 v[2] = epz;
8765
8766 /* Re-express as an r-matrix. */
8767 double[][] r5ht = jauRv2m(v);
8768 jauCr(r5ht, r5h);
8769
8770 /* Hipparcos wrt FK5 spin expressed as an r-vector. */
8771 s5h[0] = omx;
8772 s5h[1] = omy;
8773 s5h[2] = omz;
8774
8775 return;
8776
8777 }
8778
8779 /**
8780 * Position consisting of (α, δ) pairs in radians. Where α is right ascension (or longitude angle) and δ is declination (or latitude angle).
8781 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 1 Feb 2010
8782 *
8783 * @since AIDA Stage 1
8784 * @TODO needs better name cf {@link SphericalPosition}
8785 */
8786 public static class SphericalCoordinate {
8787 public double alpha;
8788 public double delta;
8789 public SphericalCoordinate(double alpha, double delta){
8790 this.alpha = alpha;
8791 this.delta = delta;
8792 }
8793 }
8794
8795 /**
8796 * Spherical coordinate with equation of origins .
8797 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 28 Mar 2014
8798 * @version $Revision$ $date$
8799 */
8800 public static class SphericalCoordinateEO {
8801 public SphericalCoordinate pos;
8802 public double eo;
8803 /**
8804 * @param pos
8805 * @param eo
8806 */
8807 public SphericalCoordinateEO(SphericalCoordinate pos, double eo) {
8808 this.pos = pos;
8809 this.eo = eo;
8810 }
8811
8812
8813 }
8814 /**
8815 * Transform an FK5 (J2000.0) star position into the system of the
8816 * Hipparcos catalogue, assuming zero Hipparcos proper motion.
8817 *
8818 *<p>This function is derived from the International Astronomical Union's
8819 * SOFA (Standards Of Fundamental Astronomy) software collection.
8820 *
8821 *<p>Status: support function.
8822 *
8823 *<!-- Given: -->
8824 * @param r5 double FK5 RA (radians), equinox J2000.0, at date
8825 * @param d5 double FK5 Dec (radians), equinox J2000.0, at date
8826 * @param date1 double TDB date (Notes 1,2)
8827 * @param date2 double TDB date (Notes 1,2)
8828 *
8829 *<!-- Returned: -->
8830 * @return rh double <u>returned</u> Hipparcos RA (radians)
8831 * dh double <u>returned</u> Hipparcos Dec (radians)
8832 *
8833 * <p>Notes:
8834 * <ol>
8835 *
8836 * <li> This function converts a star position from the FK5 system to
8837 * the Hipparcos system, in such a way that the Hipparcos proper
8838 * motion is zero. Because such a star has, in general, a non-zero
8839 * proper motion in the FK5 system, the function requires the date
8840 * at which the position in the FK5 system was determined.
8841 *
8842 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
8843 * convenient way between the two arguments. For example,
8844 * JD(TT)=2450123.7 could be expressed in any of these ways,
8845 * among others:
8846 *<pre>
8847 * date1 date2
8848 *
8849 * 2450123.7 0.0 (JD method)
8850 * 2451545.0 -1421.3 (J2000 method)
8851 * 2400000.5 50123.2 (MJD method)
8852 * 2450123.5 0.2 (date & time method)
8853 *</pre>
8854 * The JD method is the most natural and convenient to use in
8855 * cases where the loss of several decimal digits of resolution
8856 * is acceptable. The J2000 method is best matched to the way
8857 * the argument is handled internally and will deliver the
8858 * optimum resolution. The MJD method and the date & time methods
8859 * are both good compromises between resolution and convenience.
8860 *
8861 * <li> The FK5 to Hipparcos transformation is modeled as a pure
8862 * rotation and spin; zonal errors in the FK5 catalogue are not
8863 * taken into account.
8864 *
8865 * <li> The position returned by this function is in the Hipparcos
8866 * reference system but at date date1+date2.
8867 *
8868 * <li> See also jauFk52h, jauH2fk5, jauHfk5z.
8869 *</ol>
8870 *<p>Called:<ul>
8871 * <li>{@link #jauS2c} spherical coordinates to unit vector
8872 * <li>{@link #jauFk5hip} FK5 to Hipparcos rotation and spin
8873 * <li>{@link #jauSxp} multiply p-vector by scalar
8874 * <li>{@link #jauRv2m} r-vector to r-matrix
8875 * <li>{@link #jauTrxp} product of transpose of r-matrix and p-vector
8876 * <li>{@link #jauPxp} vector product of two p-vectors
8877 * <li>{@link #jauC2s} p-vector to spherical
8878 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
8879 * </ul>
8880 *<p>Reference:
8881 *
8882 * <p>F.Mignard & M.Froeschle, 2000, Astron.Astrophys. 354, 732-739.
8883 *
8884 *@version 2009 December 17
8885 *
8886 * @since Release 20101201
8887 *
8888 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
8889 */
8890 public static SphericalCoordinate jauFk5hz(double r5, double d5, double date1, double date2
8891 )
8892 {
8893 double t, p5e[] = new double[3], r5h[][] = new double[3][3], s5h[] = new double[3], vst[] = new double[3], rst[][] = new double[3][3], p5[] = new double[3],
8894 ph[] = new double[3];
8895
8896
8897 /* Interval from given date to fundamental epoch J2000.0 (JY). */
8898 t = - ((date1 - DJ00) + date2) / DJY;
8899
8900 /* FK5 barycentric position vector. */
8901 p5e = jauS2c(r5,d5);
8902
8903 /* FK5 to Hipparcos orientation matrix and spin vector. */
8904 jauFk5hip(r5h, s5h);
8905
8906 /* Accumulated Hipparcos wrt FK5 spin over that interval. */
8907 vst = jauSxp(t,s5h);
8908
8909 /* Express the accumulated spin as a rotation matrix. */
8910 rst = jauRv2m(vst);
8911
8912 /* Derotate the vector's FK5 axes back to date. */
8913 p5 = jauTrxp(rst, p5e);
8914
8915 /* Rotate the vector into the Hipparcos system. */
8916 ph = jauRxp(r5h, p5);
8917
8918 /* Hipparcos vector to spherical. */
8919 SphericalCoordinate sc = jauC2s(ph);
8920 double rh = jauAnp(sc.alpha);
8921 sc.alpha = rh;
8922
8923 return sc;
8924
8925 }
8926
8927
8928 /**
8929 * Form rotation matrix given the Fukushima-Williams angles.
8930 *
8931 *<p>This function is derived from the International Astronomical Union's
8932 * SOFA (Standards Of Fundamental Astronomy) software collection.
8933 *
8934 *<p>Status: support function.
8935 *
8936 *<!-- Given: -->
8937 * @param gamb double F-W angle gamma_bar (radians)
8938 * @param phib double F-W angle phi_bar (radians)
8939 * @param psi double F-W angle psi (radians)
8940 * @param eps double F-W angle epsilon (radians)
8941 *
8942 *<!-- Returned: -->
8943 * @return r double[3][3] <u>returned</u> rotation matrix
8944 *
8945 * <p>Notes:
8946 * <ol>
8947 *
8948 * <li> Naming the following points:
8949 *
8950 * e = J2000.0 ecliptic pole,
8951 * p = GCRS pole,
8952 * E = ecliptic pole of date,
8953 * and P = CIP,
8954 *
8955 * the four Fukushima-Williams angles are as follows:
8956 *
8957 * gamb = gamma = epE
8958 * phib = phi = pE
8959 * psi = psi = pEP
8960 * eps = epsilon = EP
8961 *
8962 * <li> The matrix representing the combined effects of frame bias,
8963 * precession and nutation is:
8964 *
8965 * NxPxB = R_1(-eps).R_3(-psi).R_1(phib).R_3(gamb)
8966 *
8967 * <li> Three different matrices can be constructed, depending on the
8968 * supplied angles:
8969 *
8970 * o To obtain the nutation x precession x frame bias matrix,
8971 * generate the four precession angles, generate the nutation
8972 * components and add them to the psi_bar and epsilon_A angles,
8973 * and call the present function.
8974 *
8975 * o To obtain the precession x frame bias matrix, generate the
8976 * four precession angles and call the present function.
8977 *
8978 * o To obtain the frame bias matrix, generate the four precession
8979 * angles for date J2000.0 and call the present function.
8980 *
8981 * The nutation-only and precession-only matrices can if necessary
8982 * be obtained by combining these three appropriately.
8983 *</ol>
8984 *<p>Called:<ul>
8985 * <li>{@link #jauIr} initialize r-matrix to identity
8986 * <li>{@link #jauRz} rotate around Z-axis
8987 * <li>{@link #jauRx} rotate around X-axis
8988 * </ul>
8989 *<p>Reference:
8990 *
8991 * Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351
8992 *
8993 *@version 2009 December 17
8994 *
8995 * @since Release 20101201
8996 *
8997 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
8998 */
8999 public static double[][] jauFw2m(double gamb, double phib, double psi, double eps)
9000 {
9001 /* Construct the matrix. */
9002 double r[][] = new double[3][3];
9003 jauIr(r);
9004 jauRz(gamb, r);
9005 jauRx(phib, r);
9006 jauRz(-psi, r);
9007 jauRx(-eps, r);
9008
9009 return r;
9010
9011 }
9012
9013
9014 /**
9015 * CIP X,Y given Fukushima-Williams bias-precession-nutation angles.
9016 *
9017 *<p>This function is derived from the International Astronomical Union's
9018 * SOFA (Standards Of Fundamental Astronomy) software collection.
9019 *
9020 *<p>Status: support function.
9021 *
9022 *<!-- Given: -->
9023 * @param gamb double F-W angle gamma_bar (radians)
9024 * @param phib double F-W angle phi_bar (radians)
9025 * @param psi double F-W angle psi (radians)
9026 * @param eps double F-W angle epsilon (radians)
9027 *
9028 *<!-- Returned: -->
9029 * @return CIP unit vector X,Y
9030 *
9031 * <p>Notes:
9032 * <ol>
9033 *
9034 * <li> Naming the following points:
9035 *
9036 * e = J2000.0 ecliptic pole,
9037 * p = GCRS pole
9038 * E = ecliptic pole of date,
9039 * and P = CIP,
9040 *
9041 * the four Fukushima-Williams angles are as follows:
9042 *
9043 * gamb = gamma = epE
9044 * phib = phi = pE
9045 * psi = psi = pEP
9046 * eps = epsilon = EP
9047 *
9048 * <li> The matrix representing the combined effects of frame bias,
9049 * precession and nutation is:
9050 *
9051 * NxPxB = R_1(-epsA).R_3(-psi).R_1(phib).R_3(gamb)
9052 *
9053 * The returned values x,y are elements [2][0] and [2][1] of the
9054 * matrix. Near J2000.0, they are essentially angles in radians
9055 *
9056 * X,Y are elements (3,1) and (3,2) of the matrix.
9057 *</ol>
9058 *<p>Called:<ul>
9059 * <li>{@link #jauFw2m} F-W angles to r-matrix
9060 * <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
9061 * </ul>
9062 *<p>Reference:
9063 *
9064 * Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351
9065 *
9066 *@version 2009 December 17
9067 *
9068 * @since Release 20101201
9069 *
9070 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
9071 */
9072 public static CelestialIntermediatePole jauFw2xy(double gamb, double phib, double psi, double eps)
9073 {
9074 double r[][] = new double[3][3];
9075
9076
9077 /* Form NxPxB matrix. */
9078 r = jauFw2m(gamb, phib, psi, eps);
9079
9080 /* Extract CIP X,Y. */
9081 return jauBpn2xy(r);
9082
9083 }
9084
9085 /**
9086 * Geodetic coordinates.
9087 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
9088 *
9089 * @since AIDA Stage 1
9090 */
9091 public static class GeodeticCoord {
9092 /** longitude (radians, east +ve) */
9093 public double elong;
9094 /** latitude (geodetic, radians) */
9095 public double phi;
9096 /** height above ellipsoid (geodetic) */
9097 public double height;
9098 public GeodeticCoord(double elong, double phi, double height) {
9099 this.elong = elong;
9100 this.phi = phi;
9101 this.height = height;
9102 }
9103 }
9104 /**
9105 * Transform geocentric coordinates to geodetic using the specified
9106 * reference ellipsoid.
9107 *
9108 *<p>This function is derived from the International Astronomical Union's
9109 * JSOFA (Standards of Fundamental Astronomy) software collection.
9110 *
9111 *<p>Status: canonical transformation.
9112 *
9113 *<!-- Given: -->
9114 * @param n int ellipsoid identifier (Note 1)
9115 * @param xyz double[3] geocentric vector (Note 2)
9116 *
9117 *<!-- Returned: -->
9118 * @return elong double <u>returned</u> longitude (radians, east +ve)
9119 * phi double <u>returned</u> latitude (geodetic, radians, Note 3)
9120 * height double <u>returned</u> height above ellipsoid (geodetic, Notes 2,3)
9121 *
9122 * <!-- Returned (function value): -->
9123 * @throws JSOFAIllegalParameter
9124 * 0 = OK
9125 * -1 = illegal identifier (Note 3)
9126 * -2 = internal error (Note 3)
9127 *
9128 * <p>Notes:
9129 * <ol>
9130 *
9131 * <li> The identifier n is a number that specifies the choice of
9132 * reference ellipsoid. The following are supported:
9133 *
9134 * n ellipsoid
9135 *
9136 * 1 WGS84
9137 * 2 GRS80
9138 *
9139 * The number n has no significance outside the JSOFA software.
9140 *
9141 * <li> The geocentric vector (xyz, given) and height (height, returned)
9142 * are in meters.
9143 *
9144 * <li> An error status -1 means that the identifier n is illegal. An
9145 * error status -2 is theoretically impossible. In all error cases,
9146 * phi and height are both set to -1e9.
9147 *
9148 * <li> The inverse transformation is performed in the function jauGd2gc.
9149 *</ol>
9150 *<p>Called:<ul>
9151 * <li>{@link #jauEform} Earth reference ellipsoids
9152 * <li>{@link #jauGc2gde} geocentric to geodetic transformation, general
9153 * </ul>
9154 *@version 2010 January 18
9155 *
9156 * @since Release 20101201
9157 *
9158 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
9159 */
9160 public static GeodeticCoord jauGc2gd ( int n, double xyz[] ) throws JSOFAIllegalParameter
9161 {
9162 GeodeticCoord gc;
9163
9164
9165 /* Obtain reference ellipsoid parameters. */
9166 ReferenceEllipsoid el = jauEform ( n );
9167
9168 /* If OK, transform x,y,z to longitude, geodetic latitude, height. */
9169 gc = jauGc2gde ( el.a, el.f, xyz);
9170
9171 /* Return the status. */
9172 return gc;
9173
9174
9175 }
9176
9177 /**
9178 * Transform geocentric coordinates to geodetic for a reference
9179 * ellipsoid of specified form.
9180 *
9181 *<p>This function is derived from the International Astronomical Union's
9182 * JSOFA (Standards of Fundamental Astronomy) software collection.
9183 *
9184 *<p>Status: support function.
9185 *
9186 *<!-- Given: -->
9187 * @param a double equatorial radius (Notes 2,4)
9188 * @param f double flattening (Note 3)
9189 * @param xyz double[3] geocentric vector (Note 4)
9190 *
9191 *<!-- Returned: -->
9192 * @return GeodeticCoord logitude (radians, east +ve) latitude (geodetic, radians) height above ellipsoid (geodetic, Note 4)
9193 *
9194 * @throws JSOFAIllegalParameter
9195 * int status:
9196 *
9197 * -1 = illegal a
9198 * -2 = illegal f
9199 *
9200 * <p>Notes:
9201 * <ol>
9202 *
9203 * <li> This function is based on the GCONV2H Fortran subroutine by
9204 * Toshio Fukushima (see reference).
9205 *
9206 * <li> The equatorial radius, a, can be in any units, but meters is
9207 * the conventional choice.
9208 *
9209 * <li> The flattening, f, is (for the Earth) a value around 0.00335,
9210 * i.e. around 1/298.
9211 *
9212 * <li> The equatorial radius, a, and the geocentric vector, xyz,
9213 * must be given in the same units, and determine the units of
9214 * the returned height, height.
9215 *
9216 * <li> If an error occurs (status < 0), elong, phi and height are
9217 * unchanged.
9218 *
9219 * <li> The inverse transformation is performed in the function
9220 * jauGd2gce.
9221 *
9222 * <li> The transformation for a standard ellipsoid (such as WGS84) can
9223 * more conveniently be performed by calling jauGc2gd, which uses a
9224 * numerical code (1 for WGS84) to identify the required A and F
9225 * values.
9226 *</ol>
9227 *<p>Reference:
9228 *
9229 * Fukushima, T., "Transformation from Cartesian to geodetic
9230 * coordinates accelerated by Halley's method", J.Geodesy (2006)
9231 * 79: 689-693
9232 *
9233 *@version 2009 November 2
9234 *
9235 * @since Release 20101201
9236 *
9237 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
9238 *
9239 */
9240 public static GeodeticCoord jauGc2gde ( double a, double f, double xyz[] ) throws JSOFAIllegalParameter
9241 {
9242 double aeps2, e2, e4t, ec2, ec, b, x, y, z, p2, absz, p, s0, pn, zc,
9243 c0, c02, c03, s02, s03, a02, a0, a03, d0, f0, b0, s1,
9244 cc, s12, cc2;
9245
9246 double phi, height;
9247 /* ------------- */
9248 /* Preliminaries */
9249 /* ------------- */
9250
9251 /* Validate ellipsoid parameters. */
9252 if ( f < 0.0 || f >= 1.0 ) throw new JSOFAIllegalParameter("bad f", -1);
9253 if ( a <= 0.0 ) throw new JSOFAIllegalParameter("bad a", -2);
9254
9255 /* Functions of ellipsoid parameters (with further validation of f). */
9256 aeps2 = a*a * 1e-32;
9257 e2 = (2.0 - f) * f;
9258 e4t = e2*e2 * 1.5;
9259 ec2 = 1.0 - e2;
9260 if ( ec2 <= 0.0 ) throw new JSOFAIllegalParameter("bad f", -1);
9261 ec = sqrt(ec2);
9262 b = a * ec;
9263
9264 /* Cartesian components. */
9265 x = xyz[0];
9266 y = xyz[1];
9267 z = xyz[2];
9268
9269 /* Distance from polar axis squared. */
9270 p2 = x*x + y*y;
9271
9272 /* Longitude. */
9273 double elong = p2 > 0.0 ? atan2(y, x) : 0.0;
9274
9275 /* Unsigned z-coordinate. */
9276 absz = abs(z);
9277
9278 /* Proceed unless polar case. */
9279 if ( p2 > aeps2 ) {
9280
9281 /* Distance from polar axis. */
9282 p = sqrt(p2);
9283
9284 /* Normalization. */
9285 s0 = absz / a;
9286 pn = p / a;
9287 zc = ec * s0;
9288
9289 /* Prepare Newton correction factors. */
9290 c0 = ec * pn;
9291 c02 = c0 * c0;
9292 c03 = c02 * c0;
9293 s02 = s0 * s0;
9294 s03 = s02 * s0;
9295 a02 = c02 + s02;
9296 a0 = sqrt(a02);
9297 a03 = a02 * a0;
9298 d0 = zc*a03 + e2*s03;
9299 f0 = pn*a03 - e2*c03;
9300
9301 /* Prepare Halley correction factor. */
9302 b0 = e4t * s02 * c02 * pn * (a0 - ec);
9303 s1 = d0*f0 - b0*s0;
9304 cc = ec * (f0*f0 - b0*c0);
9305
9306 /* Evaluate latitude and height. */
9307 phi = atan(s1/cc);
9308 s12 = s1 * s1;
9309 cc2 = cc * cc;
9310 height = (p*cc + absz*s1 - a * sqrt(ec2*s12 + cc2)) /
9311 sqrt(s12 + cc2);
9312 } else {
9313
9314 /* Exception: pole. */
9315 phi = DPI / 2.0;
9316 height = absz - b;
9317 }
9318
9319 /* Restore sign of latitude. */
9320 if ( z < 0 ) phi = -phi;
9321
9322 /* OK status. */
9323 return new GeodeticCoord(elong, phi, height);
9324
9325
9326 }
9327
9328
9329 /**
9330 * Transform geodetic coordinates to geocentric using the specified
9331 * reference ellipsoid.
9332 *
9333 *<p>This function is derived from the International Astronomical Union's
9334 * JSOFA (Standards of Fundamental Astronomy) software collection.
9335 *
9336 *<p>Status: canonical transformation.
9337 *
9338 *<!-- Given: -->
9339 * @param n int ellipsoid identifier (Note 1)
9340 * @param elong double longitude (radians, east +ve)
9341 * @param phi double latitude (geodetic, radians, Note 3)
9342 * @param height double height above ellipsoid (geodetic, Notes 2,3)
9343 *
9344 *<!-- Returned: -->
9345 * @return xyz double[3] <u>returned</u> geocentric vector (Note 2)
9346 *
9347 * <!-- Returned (function value): -->
9348 * @throws JSOFAIllegalParameter
9349 * -1 = illegal identifier (Note 3)
9350 * -2 = illegal case (Note 3)
9351 *
9352 * <p>Notes:
9353 * <ol>
9354 *
9355 * <li> The identifier n is a number that specifies the choice of
9356 * reference ellipsoid. The following are supported:
9357 *
9358 * n ellipsoid
9359 *
9360 * 1 WGS84
9361 * 2 GRS80
9362 *
9363 * The number n has no significance outside the JSOFA software.
9364 *
9365 * <li> The height (height, given) and the geocentric vector (xyz,
9366 * returned) are in meters.
9367 *
9368 * <li> No validation is performed on the arguments elong, phi and
9369 * height. An error status -1 means that the identifier n is
9370 * illegal. An error status -2 protects against cases that would
9371 * lead to arithmetic exceptions. In all error cases, xyz is set
9372 * to zeros.
9373 *
9374 * <li> The inverse transformation is performed in the function jauGc2gd.
9375 *</ol>
9376 *<p>Called:<ul>
9377 * <li>{@link #jauEform} Earth reference ellipsoids
9378 * <li>{@link #jauGd2gce} geodetic to geocentric transformation, general
9379 * <li>{@link #jauZp} zero p-vector
9380 * </ul>
9381 *@version 2010 January 18
9382 *
9383 * @since Release 20101201
9384 *
9385 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
9386 */
9387 public static double[] jauGd2gc ( int n, double elong, double phi, double height ) throws JSOFAIllegalParameter, JSOFAInternalError
9388 {
9389
9390
9391 /* Obtain reference ellipsoid parameters. */
9392 ReferenceEllipsoid em = jauEform ( n );
9393
9394 /* If OK, transform longitude, geodetic latitude, height to x,y,z. */
9395 return jauGd2gce ( em.a, em.f, elong, phi, height );
9396
9397
9398 }
9399
9400
9401 /**
9402 * Transform geodetic coordinates to geocentric for a reference
9403 * ellipsoid of specified form.
9404 *
9405 *<p>This function is derived from the International Astronomical Union's
9406 * JSOFA (Standards of Fundamental Astronomy) software collection.
9407 *
9408 *<p>Status: support function.
9409 *
9410 *<!-- Given: -->
9411 * @param a double equatorial radius (Notes 1,4)
9412 * @param f double flattening (Notes 2,4)
9413 * @param elong double longitude (radians, east +ve)
9414 * @param phi double latitude (geodetic, radians, Note 4)
9415 * @param height double height above ellipsoid (geodetic, Notes 3,4)
9416 *
9417 *<!-- Returned: -->
9418 * @return xyz double[3] <u>returned</u> geocentric vector (Note 3)
9419 *
9420 * <!-- Returned (function value): -->
9421 *
9422 * @throws JSOFAInternalError 0 = OK
9423 * -1 = illegal case (Note 4)
9424 * <p>Notes:
9425 * <ol>
9426 *
9427 * <li> The equatorial radius, a, can be in any units, but meters is
9428 * the conventional choice.
9429 *
9430 * <li> The flattening, f, is (for the Earth) a value around 0.00335,
9431 * i.e. around 1/298.
9432 *
9433 * <li> The equatorial radius, a, and the height, height, must be
9434 * given in the same units, and determine the units of the
9435 * returned geocentric vector, xyz.
9436 *
9437 * <li> No validation is performed on individual arguments. The error
9438 * status -1 protects against (unrealistic) cases that would lead
9439 * to arithmetic exceptions. If an error occurs, xyz is unchanged.
9440 *
9441 * <li> The inverse transformation is performed in the function
9442 * jauGc2gde.
9443 *
9444 * <li> The transformation for a standard ellipsoid (such as WGS84) can
9445 * more conveniently be performed by calling jauGd2gc, which uses a
9446 * numerical code (1 for WGS84) to identify the required a and f
9447 * values.
9448 *</ol>
9449 *<p>References:
9450 *
9451 * <p>Green, R.M., Spherical Astronomy, Cambridge University Press,
9452 * (1985) Section 4.5, p96.
9453 *
9454 * <p>Explanatory Supplement to the Astronomical Almanac,
9455 * P. Kenneth Seidelmann (ed), University Science Books (1992),
9456 * Section 4.22, p202.
9457 *
9458 *@version 2009 November 2
9459 *
9460 * @since Release 20101201
9461 *
9462 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
9463 */
9464 public static double[] jauGd2gce ( double a, double f, double elong, double phi,
9465 double height ) throws JSOFAInternalError
9466 {
9467 double sp, cp, w, d, ac, as, r;
9468 double xyz[] = new double[3];
9469
9470
9471 /* Functions of geodetic latitude. */
9472 sp = sin(phi);
9473 cp = cos(phi);
9474 w = 1.0 - f;
9475 w = w * w;
9476 d = cp*cp + w*sp*sp;
9477 if ( d <= 0.0 ) throw new JSOFAInternalError("illegal combination of arguments d< 0", -1);
9478 ac = a / sqrt(d);
9479 as = w * ac;
9480
9481 /* Geocentric vector. */
9482 r = (ac + height) * cp;
9483 xyz[0] = r * cos(elong);
9484 xyz[1] = r * sin(elong);
9485 xyz[2] = (as + height) * sp;
9486
9487 /* Success. */
9488 return xyz;
9489
9490
9491 }
9492
9493
9494 /**
9495 * Greenwich mean sidereal time (model consistent with IAU 2000
9496 * resolutions).
9497 *
9498 *<p>This function is derived from the International Astronomical Union's
9499 * SOFA (Standards Of Fundamental Astronomy) software collection.
9500 *
9501 *<p>Status: canonical model.
9502 *
9503 *<!-- Given: -->
9504 * @param uta double UT1 as a 2-part Julian Date (Notes 1,2)
9505 * @param utb double UT1 as a 2-part Julian Date (Notes 1,2)
9506 * @param tta double TT as a 2-part Julian Date (Notes 1,2)
9507 * @param ttb double TT as a 2-part Julian Date (Notes 1,2)
9508 *
9509 * <!-- Returned (function value): -->
9510 * @return double Greenwich mean sidereal time (radians)
9511 *
9512 * <p>Notes:
9513 * <ol>
9514 *
9515 * <li> The UT1 and TT dates uta+utb and tta+ttb respectively, are both
9516 * Julian Dates, apportioned in any convenient way between the
9517 * argument pairs. For example, JD=2450123.7 could be expressed in
9518 * any of these ways, among others:
9519 *<pre>
9520 * Part A Part B
9521 *
9522 * 2450123.7 0.0 (JD method)
9523 * 2451545.0 -1421.3 (J2000 method)
9524 * 2400000.5 50123.2 (MJD method)
9525 * 2450123.5 0.2 (date & time method)
9526 *</pre>
9527 * The JD method is the most natural and convenient to use in
9528 * cases where the loss of several decimal digits of resolution
9529 * is acceptable (in the case of UT; the TT is not at all critical
9530 * in this respect). The J2000 and MJD methods are good compromises
9531 * between resolution and convenience. For UT, the date & time
9532 * method is best matched to the algorithm that is used by the Earth
9533 * Rotation Angle function, called internally: maximum precision is
9534 * delivered when the uta argument is for 0hrs UT1 on the day in
9535 * question and the utb argument lies in the range 0 to 1, or vice
9536 * versa.
9537 *
9538 * <li> Both UT1 and TT are required, UT1 to predict the Earth rotation
9539 * and TT to predict the effects of precession. If UT1 is used for
9540 * both purposes, errors of order 100 microarcseconds result.
9541 *
9542 * <li> This GMST is compatible with the IAU 2000 resolutions and must be
9543 * used only in conjunction with other IAU 2000 compatible
9544 * components such as precession-nutation and equation of the
9545 * equinoxes.
9546 *
9547 * <li> The result is returned in the range 0 to 2pi.
9548 *
9549 * <li> The algorithm is from Capitaine et al. (2003) and IERS
9550 * Conventions 2003.
9551 *</ol>
9552 *<p>Called:<ul>
9553 * <li>{@link #jauEra00} Earth rotation angle, IAU 2000
9554 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
9555 * </ul>
9556 *<p>References:
9557 *
9558 * <p>Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
9559 * implement the IAU 2000 definition of UT1", Astronomy &
9560 * Astrophysics, 406, 1135-1149 (2003)
9561 *
9562 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
9563 * IERS Technical Note No. 32, BKG (2004)
9564 *
9565 *@version 2009 March 16
9566 *
9567 * @since Release 20101201
9568 *
9569 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
9570 */
9571 public static double jauGmst00(double uta, double utb, double tta, double ttb)
9572 {
9573 double t, gmst;
9574
9575
9576 /* TT Julian centuries since J2000.0. */
9577 t = ((tta - DJ00) + ttb) / DJC;
9578
9579 /* Greenwich Mean Sidereal Time, IAU 2000. */
9580 gmst = jauAnp(jauEra00(uta, utb) +
9581 ( 0.014506 +
9582 ( 4612.15739966 +
9583 ( 1.39667721 +
9584 ( -0.00009344 +
9585 ( 0.00001882 )
9586 * t) * t) * t) * t) * DAS2R);
9587
9588 return gmst;
9589
9590 }
9591
9592
9593 /**
9594 * Greenwich mean sidereal time (consistent with IAU 2006 precession).
9595 *
9596 *<p>This function is derived from the International Astronomical Union's
9597 * SOFA (Standards Of Fundamental Astronomy) software collection.
9598 *
9599 *<p>Status: canonical model.
9600 *
9601 *<!-- Given: -->
9602 * @param uta double UT1 as a 2-part Julian Date (Notes 1,2)
9603 * @param utb double UT1 as a 2-part Julian Date (Notes 1,2)
9604 * @param tta double TT as a 2-part Julian Date (Notes 1,2)
9605 * @param ttb double TT as a 2-part Julian Date (Notes 1,2)
9606 *
9607 * <!-- Returned (function value): -->
9608 * @return double Greenwich mean sidereal time (radians)
9609 *
9610 * <p>Notes:
9611 * <ol>
9612 *
9613 * <li> The UT1 and TT dates uta+utb and tta+ttb respectively, are both
9614 * Julian Dates, apportioned in any convenient way between the
9615 * argument pairs. For example, JD=2450123.7 could be expressed in
9616 * any of these ways, among others:
9617 *<pre>
9618 * Part A Part B
9619 *
9620 * 2450123.7 0.0 (JD method)
9621 * 2451545.0 -1421.3 (J2000 method)
9622 * 2400000.5 50123.2 (MJD method)
9623 * 2450123.5 0.2 (date & time method)
9624 *</pre>
9625 * The JD method is the most natural and convenient to use in
9626 * cases where the loss of several decimal digits of resolution
9627 * is acceptable (in the case of UT; the TT is not at all critical
9628 * in this respect). The J2000 and MJD methods are good compromises
9629 * between resolution and convenience. For UT, the date & time
9630 * method is best matched to the algorithm that is used by the Earth
9631 * rotation angle function, called internally: maximum precision is
9632 * delivered when the uta argument is for 0hrs UT1 on the day in
9633 * question and the utb argument lies in the range 0 to 1, or vice
9634 * versa.
9635 *
9636 * <li> Both UT1 and TT are required, UT1 to predict the Earth rotation
9637 * and TT to predict the effects of precession. If UT1 is used for
9638 * both purposes, errors of order 100 microarcseconds result.
9639 *
9640 * <li> This GMST is compatible with the IAU 2006 precession and must not
9641 * be used with other precession models.
9642 *
9643 * <li> The result is returned in the range 0 to 2pi.
9644 *</ol>
9645 *<p>Called:<ul>
9646 * <li>{@link #jauEra00} Earth rotation angle, IAU 2000
9647 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
9648 * </ul>
9649 *<p>Reference:
9650 *
9651 * <p>Capitaine, N., Wallace, P.T. & Chapront, J., 2005,
9652 * Astron.Astrophys. 432, 355
9653 *
9654 *@version 2008 May 24
9655 *
9656 * @since Release 20101201
9657 *
9658 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
9659 */
9660 public static double jauGmst06(double uta, double utb, double tta, double ttb)
9661 {
9662 double t, gmst;
9663
9664
9665 /* TT Julian centuries since J2000.0. */
9666 t = ((tta - DJ00) + ttb) / DJC;
9667
9668 /* Greenwich mean sidereal time, IAU 2006. */
9669 gmst = jauAnp(jauEra00(uta, utb) +
9670 ( 0.014506 +
9671 ( 4612.156534 +
9672 ( 1.3915817 +
9673 ( -0.00000044 +
9674 ( -0.000029956 +
9675 ( -0.0000000368 )
9676 * t) * t) * t) * t) * t) * DAS2R);
9677
9678 return gmst;
9679
9680 }
9681
9682
9683 /**
9684 * Universal Time to Greenwich mean sidereal time (IAU 1982 model).
9685 *
9686 *<p>This function is derived from the International Astronomical Union's
9687 * SOFA (Standards Of Fundamental Astronomy) software collection.
9688 *
9689 *<p>Status: canonical model.
9690 *
9691 *<!-- Given: -->
9692 * @param dj1 double UT1 Julian Date (see note)
9693 * @param dj2 double UT1 Julian Date (see note)
9694 *
9695 * <!-- Returned (function value): -->
9696 * @return double Greenwich mean sidereal time (radians)
9697 *
9698 * <p>Notes:
9699 * <ol>
9700 *
9701 * <li> The UT1 date dj1+dj2 is a Julian Date, apportioned in any
9702 * convenient way between the arguments dj1 and dj2. For example,
9703 * JD(UT1)=2450123.7 could be expressed in any of these ways,
9704 * among others:
9705 *<pre>
9706 * dj1 dj2
9707 *
9708 * 2450123.7D0 0D0 (JD method)
9709 * 2451545D0 -1421.3D0 (J2000 method)
9710 * 2400000.5D0 50123.2D0 (MJD method)
9711 * 2450123.5D0 0.2D0 (date & time method)
9712 *</pre>
9713 * The JD method is the most natural and convenient to use in
9714 * cases where the loss of several decimal digits of resolution
9715 * is acceptable. The J2000 and MJD methods are good compromises
9716 * between resolution and convenience. The date & time method is
9717 * best matched to the algorithm used: maximum accuracy (or, at
9718 * least, minimum noise) is delivered when the dj1 argument is for
9719 * 0hrs UT1 on the day in question and the dj2 argument lies in the
9720 * range 0 to 1, or vice versa.
9721 *
9722 * <li> The algorithm is based on the IAU 1982 expression. This is
9723 * always described as giving the GMST at 0 hours UT1. In fact, it
9724 * gives the difference between the GMST and the UT, the steady
9725 * 4-minutes-per-day drawing-ahead of ST with respect to UT. When
9726 * whole days are ignored, the expression happens to equal the GMST
9727 * at 0 hours UT1 each day.
9728 *
9729 * <li> In this function, the entire UT1 (the sum of the two arguments
9730 * dj1 and dj2) is used directly as the argument for the standard
9731 * formula, the constant term of which is adjusted by 12 hours to
9732 * take account of the noon phasing of Julian Date. The UT1 is then
9733 * added, but omitting whole days to conserve accuracy.
9734 *</ol>
9735 *<p>Called:<ul>
9736 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
9737 * </ul>
9738 *<p>References:
9739 *
9740 * <p>Transactions of the International Astronomical Union,
9741 * XVIII B, 67 (1983).
9742 *
9743 * <p>Aoki et al., Astron. Astrophys. 105, 359-361 (1982).
9744 *
9745 *@version 2008 May 24
9746 *
9747 * @since Release 20101201
9748 *
9749 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
9750 */
9751 public static double jauGmst82(double dj1, double dj2)
9752 {
9753 /* Coefficients of IAU 1982 GMST-UT1 model */
9754 double A = 24110.54841 - DAYSEC / 2.0;
9755 double B = 8640184.812866;
9756 double C = 0.093104;
9757 double D = -6.2e-6;
9758
9759 /* Note: the first constant, A, has to be adjusted by 12 hours */
9760 /* because the UT1 is supplied as a Julian date, which begins */
9761 /* at noon. */
9762
9763 double d1, d2, t, f, gmst;
9764
9765
9766 /* Julian centuries since fundamental epoch. */
9767 if (dj1 < dj2) {
9768 d1 = dj1;
9769 d2 = dj2;
9770 } else {
9771 d1 = dj2;
9772 d2 = dj1;
9773 }
9774 t = (d1 + (d2 - DJ00)) / DJC;
9775
9776 /* Fractional part of JD(UT1), in seconds. */
9777 f = DAYSEC * (fmod(d1, 1.0) + fmod(d2, 1.0));
9778
9779 /* GMST at this UT1. */
9780 gmst = jauAnp(DS2R * ((A + (B + (C + D * t) * t) * t) + f));
9781
9782 return gmst;
9783
9784 }
9785
9786
9787 /**
9788 * Greenwich apparent sidereal time (consistent with IAU 2000
9789 * resolutions).
9790 *
9791 *<p>This function is derived from the International Astronomical Union's
9792 * SOFA (Standards Of Fundamental Astronomy) software collection.
9793 *
9794 *<p>Status: canonical model.
9795 *
9796 *<!-- Given: -->
9797 * @param uta double UT1 as a 2-part Julian Date (Notes 1,2)
9798 * @param utb double UT1 as a 2-part Julian Date (Notes 1,2)
9799 * @param tta double TT as a 2-part Julian Date (Notes 1,2)
9800 * @param ttb double TT as a 2-part Julian Date (Notes 1,2)
9801 *
9802 * <!-- Returned (function value): -->
9803 * @return double Greenwich apparent sidereal time (radians)
9804 *
9805 * <p>Notes:
9806 * <ol>
9807 *
9808 * <li> The UT1 and TT dates uta+utb and tta+ttb respectively, are both
9809 * Julian Dates, apportioned in any convenient way between the
9810 * argument pairs. For example, JD=2450123.7 could be expressed in
9811 * any of these ways, among others:
9812 *<pre>
9813 * Part A Part B
9814 *
9815 * 2450123.7 0.0 (JD method)
9816 * 2451545.0 -1421.3 (J2000 method)
9817 * 2400000.5 50123.2 (MJD method)
9818 * 2450123.5 0.2 (date & time method)
9819 *</pre>
9820 * The JD method is the most natural and convenient to use in
9821 * cases where the loss of several decimal digits of resolution
9822 * is acceptable (in the case of UT; the TT is not at all critical
9823 * in this respect). The J2000 and MJD methods are good compromises
9824 * between resolution and convenience. For UT, the date & time
9825 * method is best matched to the algorithm that is used by the Earth
9826 * Rotation Angle function, called internally: maximum precision is
9827 * delivered when the uta argument is for 0hrs UT1 on the day in
9828 * question and the utb argument lies in the range 0 to 1, or vice
9829 * versa.
9830 *
9831 * <li> Both UT1 and TT are required, UT1 to predict the Earth rotation
9832 * and TT to predict the effects of precession-nutation. If UT1 is
9833 * used for both purposes, errors of order 100 microarcseconds
9834 * result.
9835 *
9836 * <li> This GAST is compatible with the IAU 2000 resolutions and must be
9837 * used only in conjunction with other IAU 2000 compatible
9838 * components such as precession-nutation.
9839 *
9840 * <li> The result is returned in the range 0 to 2pi.
9841 *
9842 * <li> The algorithm is from Capitaine et al. (2003) and IERS
9843 * Conventions 2003.
9844 *</ol>
9845 *<p>Called:<ul>
9846 * <li>{@link #jauGmst00} Greenwich mean sidereal time, IAU 2000
9847 * <li>{@link #jauEe00a} equation of the equinoxes, IAU 2000A
9848 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
9849 * </ul>
9850 *<p>References:
9851 *
9852 * <p>Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
9853 * implement the IAU 2000 definition of UT1", Astronomy &
9854 * Astrophysics, 406, 1135-1149 (2003)
9855 *
9856 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
9857 * IERS Technical Note No. 32, BKG (2004)
9858 *
9859 *@version 2008 May 16
9860 *
9861 * @since Release 20101201
9862 *
9863 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
9864 */
9865 public static double jauGst00a(double uta, double utb, double tta, double ttb)
9866 {
9867 double gmst00, ee00a, gst;
9868
9869
9870 gmst00 = jauGmst00(uta, utb, tta, ttb);
9871 ee00a = jauEe00a(tta, ttb);
9872 gst = jauAnp(gmst00 + ee00a);
9873
9874 return gst;
9875
9876 }
9877
9878
9879 /**
9880 * Greenwich apparent sidereal time (consistent with IAU 2000
9881 * resolutions but using the truncated nutation model IAU 2000B).
9882 *
9883 *<p>This function is derived from the International Astronomical Union's
9884 * SOFA (Standards Of Fundamental Astronomy) software collection.
9885 *
9886 *<p>Status: support function.
9887 *
9888 *<!-- Given: -->
9889 * @param uta double UT1 as a 2-part Julian Date (Notes 1,2)
9890 * @param utb double UT1 as a 2-part Julian Date (Notes 1,2)
9891 *
9892 * <!-- Returned (function value): -->
9893 * @return double Greenwich apparent sidereal time (radians)
9894 *
9895 * <p>Notes:
9896 * <ol>
9897 *
9898 * <li> The UT1 date uta+utb is a Julian Date, apportioned in any
9899 * convenient way between the argument pair. For example,
9900 * JD=2450123.7 could be expressed in any of these ways, among
9901 * others:
9902 *<pre>
9903 * uta utb
9904 *
9905 * 2450123.7 0.0 (JD method)
9906 * 2451545.0 -1421.3 (J2000 method)
9907 * 2400000.5 50123.2 (MJD method)
9908 * 2450123.5 0.2 (date & time method)
9909 *</pre>
9910 * The JD method is the most natural and convenient to use in cases
9911 * where the loss of several decimal digits of resolution is
9912 * acceptable. The J2000 and MJD methods are good compromises
9913 * between resolution and convenience. For UT, the date & time
9914 * method is best matched to the algorithm that is used by the Earth
9915 * Rotation Angle function, called internally: maximum precision is
9916 * delivered when the uta argument is for 0hrs UT1 on the day in
9917 * question and the utb argument lies in the range 0 to 1, or vice
9918 * versa.
9919 *
9920 * <li> The result is compatible with the IAU 2000 resolutions, except
9921 * that accuracy has been compromised for the sake of speed and
9922 * convenience in two respects:
9923 *
9924 * . UT is used instead of TDB (or TT) to compute the precession
9925 * component of GMST and the equation of the equinoxes. This
9926 * results in errors of order 0.1 mas at present.
9927 *
9928 * . The IAU 2000B abridged nutation model (McCarthy & Luzum, 2001)
9929 * is used, introducing errors of up to 1 mas.
9930 *
9931 * <li> This GAST is compatible with the IAU 2000 resolutions and must be
9932 * used only in conjunction with other IAU 2000 compatible
9933 * components such as precession-nutation.
9934 *
9935 * <li> The result is returned in the range 0 to 2pi.
9936 *
9937 * <li> The algorithm is from Capitaine et al. (2003) and IERS
9938 * Conventions 2003.
9939 *</ol>
9940 *<p>Called:<ul>
9941 * <li>{@link #jauGmst00} Greenwich mean sidereal time, IAU 2000
9942 * <li>{@link #jauEe00b} equation of the equinoxes, IAU 2000B
9943 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
9944 * </ul>
9945 *<p>References:
9946 *
9947 * <p>Capitaine, N., Wallace, P.T. and McCarthy, D.D., "Expressions to
9948 * implement the IAU 2000 definition of UT1", Astronomy &
9949 * Astrophysics, 406, 1135-1149 (2003)
9950 *
9951 * <p>McCarthy, D.D. & Luzum, B.J., "An abridged model of the
9952 * precession-nutation of the celestial pole", Celestial Mechanics &
9953 * Dynamical Astronomy, 85, 37-49 (2003)
9954 *
9955 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
9956 * IERS Technical Note No. 32, BKG (2004)
9957 *
9958 *@version 2008 May 16
9959 *
9960 * @since Release 20101201
9961 *
9962 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
9963 */
9964 public static double jauGst00b(double uta, double utb)
9965 {
9966 double gmst00, ee00b, gst;
9967
9968
9969 gmst00 = jauGmst00(uta, utb, uta, utb);
9970 ee00b = jauEe00b(uta, utb);
9971 gst = jauAnp(gmst00 + ee00b);
9972
9973 return gst;
9974
9975 }
9976
9977
9978 /**
9979 * Greenwich apparent sidereal time, IAU 2006, given the NPB matrix.
9980 *
9981 *<p>This function is derived from the International Astronomical Union's
9982 * SOFA (Standards Of Fundamental Astronomy) software collection.
9983 *
9984 *<p>Status: support function.
9985 *
9986 *<!-- Given: -->
9987 * @param uta double UT1 as a 2-part Julian Date (Notes 1,2)
9988 * @param utb double UT1 as a 2-part Julian Date (Notes 1,2)
9989 * @param tta double TT as a 2-part Julian Date (Notes 1,2)
9990 * @param ttb double TT as a 2-part Julian Date (Notes 1,2)
9991 * @param rnpb double[3][3] nutation x precession x bias matrix
9992 *
9993 * <!-- Returned (function value): -->
9994 * @return double Greenwich apparent sidereal time (radians)
9995 *
9996 * <p>Notes:
9997 * <ol>
9998 *
9999 * <li> The UT1 and TT dates uta+utb and tta+ttb respectively, are both
10000 * Julian Dates, apportioned in any convenient way between the
10001 * argument pairs. For example, JD=2450123.7 could be expressed in
10002 * any of these ways, among others:
10003 *<pre>
10004 * Part A Part B
10005 *
10006 * 2450123.7 0.0 (JD method)
10007 * 2451545.0 -1421.3 (J2000 method)
10008 * 2400000.5 50123.2 (MJD method)
10009 * 2450123.5 0.2 (date & time method)
10010 *</pre>
10011 * The JD method is the most natural and convenient to use in
10012 * cases where the loss of several decimal digits of resolution
10013 * is acceptable (in the case of UT; the TT is not at all critical
10014 * in this respect). The J2000 and MJD methods are good compromises
10015 * between resolution and convenience. For UT, the date & time
10016 * method is best matched to the algorithm that is used by the Earth
10017 * rotation angle function, called internally: maximum precision is
10018 * delivered when the uta argument is for 0hrs UT1 on the day in
10019 * question and the utb argument lies in the range 0 to 1, or vice
10020 * versa.
10021 *
10022 * <li> Both UT1 and TT are required, UT1 to predict the Earth rotation
10023 * and TT to predict the effects of precession-nutation. If UT1 is
10024 * used for both purposes, errors of order 100 microarcseconds
10025 * result.
10026 *
10027 * <li> Although the function uses the IAU 2006 series for s+XY/2, it is
10028 * otherwise independent of the precession-nutation model and can in
10029 * practice be used with any equinox-based NPB matrix.
10030 *
10031 * <li> The result is returned in the range 0 to 2pi.
10032 *</ol>
10033 *<p>Called:<ul>
10034 * <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
10035 * <li>{@link #jauS06} the CIO locator s, given X,Y, IAU 2006
10036 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
10037 * <li>{@link #jauEra00} Earth rotation angle, IAU 2000
10038 * <li>{@link #jauEors} equation of the origins, given NPB matrix and s
10039 * </ul>
10040 *<p>Reference:
10041 *
10042 * <p>Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981
10043 *
10044 *@version 2008 May 24
10045 *
10046 * @since Release 20101201
10047 *
10048 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
10049 */
10050 public static double jauGst06(double uta, double utb, double tta, double ttb,
10051 double rnpb[][])
10052 {
10053 double s, era, eors, gst;
10054
10055
10056 /* Extract CIP coordinates. */
10057 CelestialIntermediatePole cip = jauBpn2xy(rnpb);
10058
10059 /* The CIO locator, s. */
10060 s = jauS06(tta, ttb, cip.x, cip.y);
10061
10062 /* Greenwich apparent sidereal time. */
10063 era = jauEra00(uta, utb);
10064 eors = jauEors(rnpb, s);
10065 gst = jauAnp(era - eors);
10066
10067 return gst;
10068
10069 }
10070
10071
10072 /**
10073 * Greenwich apparent sidereal time (consistent with IAU 2000 and 2006
10074 * resolutions).
10075 *
10076 *<p>This function is derived from the International Astronomical Union's
10077 * SOFA (Standards Of Fundamental Astronomy) software collection.
10078 *
10079 *<p>Status: canonical model.
10080 *
10081 *<!-- Given: -->
10082 * @param uta double UT1 as a 2-part Julian Date (Notes 1,2)
10083 * @param utb double UT1 as a 2-part Julian Date (Notes 1,2)
10084 * @param tta double TT as a 2-part Julian Date (Notes 1,2)
10085 * @param ttb double TT as a 2-part Julian Date (Notes 1,2)
10086 *
10087 * <!-- Returned (function value): -->
10088 * @return double Greenwich apparent sidereal time (radians)
10089 *
10090 * <p>Notes:
10091 * <ol>
10092 *
10093 * <li> The UT1 and TT dates uta+utb and tta+ttb respectively, are both
10094 * Julian Dates, apportioned in any convenient way between the
10095 * argument pairs. For example, JD=2450123.7 could be expressed in
10096 * any of these ways, among others:
10097 *<pre>
10098 * Part A Part B
10099 *
10100 * 2450123.7 0.0 (JD method)
10101 * 2451545.0 -1421.3 (J2000 method)
10102 * 2400000.5 50123.2 (MJD method)
10103 * 2450123.5 0.2 (date & time method)
10104 *</pre>
10105 * The JD method is the most natural and convenient to use in
10106 * cases where the loss of several decimal digits of resolution
10107 * is acceptable (in the case of UT; the TT is not at all critical
10108 * in this respect). The J2000 and MJD methods are good compromises
10109 * between resolution and convenience. For UT, the date & time
10110 * method is best matched to the algorithm that is used by the Earth
10111 * rotation angle function, called internally: maximum precision is
10112 * delivered when the uta argument is for 0hrs UT1 on the day in
10113 * question and the utb argument lies in the range 0 to 1, or vice
10114 * versa.
10115 *
10116 * <li> Both UT1 and TT are required, UT1 to predict the Earth rotation
10117 * and TT to predict the effects of precession-nutation. If UT1 is
10118 * used for both purposes, errors of order 100 microarcseconds
10119 * result.
10120 *
10121 * <li> This GAST is compatible with the IAU 2000/2006 resolutions and
10122 * must be used only in conjunction with IAU 2006 precession and
10123 * IAU 2000A nutation.
10124 *
10125 * <li> The result is returned in the range 0 to 2pi.
10126 *</ol>
10127 *<p>Called:<ul>
10128 * <li>{@link #jauPnm06a} classical NPB matrix, IAU 2006/2000A
10129 * <li>{@link #jauGst06} Greenwich apparent ST, IAU 2006, given NPB matrix
10130 * </ul>
10131 *<p>Reference:
10132 *
10133 * <p>Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981
10134 *
10135 *@version 2008 May 16
10136 *
10137 * @since Release 20101201
10138 *
10139 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
10140 */
10141 public static double jauGst06a(double uta, double utb, double tta, double ttb)
10142 {
10143 double rnpb[][] = new double[3][3], gst;
10144
10145
10146 /* Classical nutation x precession x bias matrix, IAU 2000A. */
10147 rnpb = jauPnm06a(tta, ttb);
10148
10149 /* Greenwich apparent sidereal time. */
10150 gst = jauGst06(uta, utb, tta, ttb, rnpb);
10151
10152 return gst;
10153
10154 }
10155
10156
10157 /**
10158 * Greenwich apparent sidereal time (consistent with IAU 1982/94
10159 * resolutions).
10160 *
10161 *<p>This function is derived from the International Astronomical Union's
10162 * SOFA (Standards Of Fundamental Astronomy) software collection.
10163 *
10164 *<p>Status: support function.
10165 *
10166 *<!-- Given: -->
10167 * @param uta double UT1 as a 2-part Julian Date (Notes 1,2)
10168 * @param utb double UT1 as a 2-part Julian Date (Notes 1,2)
10169 *
10170 * <!-- Returned (function value): -->
10171 * @return double Greenwich apparent sidereal time (radians)
10172 *
10173 * <p>Notes:
10174 * <ol>
10175 *
10176 * <li> The UT1 date uta+utb is a Julian Date, apportioned in any
10177 * convenient way between the argument pair. For example,
10178 * JD=2450123.7 could be expressed in any of these ways, among
10179 * others:
10180 *<pre>
10181 * uta utb
10182 *
10183 * 2450123.7 0.0 (JD method)
10184 * 2451545.0 -1421.3 (J2000 method)
10185 * 2400000.5 50123.2 (MJD method)
10186 * 2450123.5 0.2 (date & time method)
10187 *</pre>
10188 * The JD method is the most natural and convenient to use in cases
10189 * where the loss of several decimal digits of resolution is
10190 * acceptable. The J2000 and MJD methods are good compromises
10191 * between resolution and convenience. For UT, the date & time
10192 * method is best matched to the algorithm that is used by the Earth
10193 * Rotation Angle function, called internally: maximum precision is
10194 * delivered when the uta argument is for 0hrs UT1 on the day in
10195 * question and the utb argument lies in the range 0 to 1, or vice
10196 * versa.
10197 *
10198 * <li> The result is compatible with the IAU 1982 and 1994 resolutions,
10199 * except that accuracy has been compromised for the sake of
10200 * convenience in that UT is used instead of TDB (or TT) to compute
10201 * the equation of the equinoxes.
10202 *
10203 * <li> This GAST must be used only in conjunction with contemporaneous
10204 * IAU standards such as 1976 precession, 1980 obliquity and 1982
10205 * nutation. It is not compatible with the IAU 2000 resolutions.
10206 *
10207 * <li> The result is returned in the range 0 to 2pi.
10208 *</ol>
10209 *<p>Called:<ul>
10210 * <li>{@link #jauGmst82} Greenwich mean sidereal time, IAU 1982
10211 * <li>{@link #jauEqeq94} equation of the equinoxes, IAU 1994
10212 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
10213 * </ul>
10214 *<p>References:
10215 *
10216 * <p>Explanatory Supplement to the Astronomical Almanac,
10217 * P. Kenneth Seidelmann (ed), University Science Books (1992)
10218 *
10219 * IAU Resolution C7, Recommendation 3 (1994)
10220 *
10221 *@version 2008 May 16
10222 *
10223 * @since Release 20101201
10224 *
10225 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
10226 */
10227 public static double jauGst94(double uta, double utb)
10228 {
10229 double gmst82, eqeq94, gst;
10230
10231
10232 gmst82 = jauGmst82(uta, utb);
10233 eqeq94 = jauEqeq94(uta, utb);
10234 gst = jauAnp(gmst82 + eqeq94);
10235
10236 return gst;
10237
10238 }
10239
10240
10241 /**
10242 * Transform Hipparcos star data into the FK5 (J2000.0) system.
10243 *
10244 *<p>This function is derived from the International Astronomical Union's
10245 * SOFA (Standards Of Fundamental Astronomy) software collection.
10246 *
10247 *<p>Status: support function.
10248 *
10249 * Given (all Hipparcos, epoch J2000.0):
10250 * @param rh double RA (radians)
10251 * @param dh double Dec (radians)
10252 * @param drh double proper motion in RA (dRA/dt, rad/Jyear)
10253 * @param ddh double proper motion in Dec (dDec/dt, rad/Jyear)
10254 * @param pxh double parallax (arcsec)
10255 * @param rvh double radial velocity (km/s, positive = receding)
10256 *
10257 * Returned (all FK5, equinox J2000.0, epoch J2000.0):
10258 * r5 double RA (radians)
10259 * d5 double Dec (radians)
10260 * dr5 double proper motion in RA (dRA/dt, rad/Jyear)
10261 * dd5 double proper motion in Dec (dDec/dt, rad/Jyear)
10262 * px5 double parallax (arcsec)
10263 * rv5 double radial velocity (km/s, positive = receding)
10264 *
10265 * <p>Notes:
10266 * <ol>
10267 *
10268 * <li> This function transforms Hipparcos star positions and proper
10269 * motions into FK5 J2000.0.
10270 *
10271 * <li> The proper motions in RA are dRA/dt rather than
10272 * cos(Dec)*dRA/dt, and are per year rather than per century.
10273 *
10274 * <li> The FK5 to Hipparcos transformation is modeled as a pure
10275 * rotation and spin; zonal errors in the FK5 catalog are not
10276 * taken into account.
10277 *
10278 * <li> See also jauFk52h, jauFk5hz, jauHfk5z.
10279 *</ol>
10280 *<p>Called:<ul>
10281 * <li>{@link #jauStarpv} star catalog data to space motion pv-vector
10282 * <li>{@link #jauFk5hip} FK5 to Hipparcos rotation and spin
10283 * <li>{@link #jauRv2m} r-vector to r-matrix
10284 * <li>{@link #jauRxp} product of r-matrix and p-vector
10285 * <li>{@link #jauTrxp} product of transpose of r-matrix and p-vector
10286 * <li>{@link #jauPxp} vector product of two p-vectors
10287 * <li>{@link #jauPmp} p-vector minus p-vector
10288 * <li>{@link #jauPvstar} space motion pv-vector to star catalog data
10289 * </ul>
10290 *<p>Reference:
10291 *
10292 * <p>F.Mignard & M.Froeschle, Astron. Astrophys. 354, 732-739 (2000).
10293 *
10294 *@version 2009 December 17
10295 *
10296 * @since Release 20101201
10297 *
10298 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
10299 */
10300 public static CatalogCoords jauH2fk5(double rh, double dh,
10301 double drh, double ddh, double pxh, double rvh)
10302 {
10303 int i;
10304 double pvh[][] = new double[2][3], r5h[][] = new double[3][3], s5h[] = new double[3], sh[] = new double[3], wxp[] = new double[3], vv[] = new double[3], pv5[][] = new double[2][3];
10305
10306
10307 /* Hipparcos barycentric position/velocity pv-vector (normalized). */
10308 jauStarpv(rh, dh, drh, ddh, pxh, rvh, pvh);
10309
10310 /* FK5 to Hipparcos orientation matrix and spin vector. */
10311 jauFk5hip(r5h, s5h);
10312
10313 /* Make spin units per day instead of per year. */
10314 for ( i = 0; i < 3; s5h[i++] /= 365.25 );
10315
10316 /* Orient the spin into the Hipparcos system. */
10317 sh = jauRxp(r5h, s5h);
10318
10319 /* De-orient the Hipparcos position into the FK5 system. */
10320 pv5[0] = jauTrxp(r5h, pvh[0]);
10321
10322 /* Apply spin to the position giving an extra space motion component. */
10323 wxp = jauPxp(pvh[0],sh);
10324
10325 /* Subtract this component from the Hipparcos space motion. */
10326 vv = jauPmp(pvh[1], wxp);
10327
10328 /* De-orient the Hipparcos space motion into the FK5 system. */
10329 pv5[1] = jauTrxp(r5h, vv);
10330
10331 /* FK5 pv-vector to spherical., r5, d5, dr5, dd5, px5, rv5 */
10332 CatalogCoords cat = null;
10333 try {
10334 cat = jauPvstar(pv5);
10335 } catch (JSOFAInternalError e) {
10336 // original code just ignored this possibility
10337 e.printStackTrace();
10338 }
10339
10340 return cat;
10341
10342 }
10343
10344
10345 /**
10346 * Transform a Hipparcos star position into FK5 J2000.0, assuming
10347 * zero Hipparcos proper motion.
10348 *
10349 *<p>This function is derived from the International Astronomical Union's
10350 * SOFA (Standards Of Fundamental Astronomy) software collection.
10351 *
10352 *<p>Status: support function.
10353 *
10354 *<!-- Given: -->
10355 * @param rh double Hipparcos RA (radians)
10356 * @param dh double Hipparcos Dec (radians)
10357 * @param date1 double TDB date (Note 1)
10358 * @param date2 double TDB date (Note 1)
10359 *
10360 * FIXME original did not return the parallax and radial velocity of the CatalogCoords type.
10361 * Returned (all FK5, equinox J2000.0, date date1+date2):
10362 * r5 double RA (radians)
10363 * d5 double Dec (radians)
10364 * dr5 double FK5 RA proper motion (rad/year, Note 4)
10365 * dd5 double Dec proper motion (rad/year, Note 4)
10366 *
10367 * <p>Notes:
10368 * <ol>
10369 *
10370 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
10371 * convenient way between the two arguments. For example,
10372 * JD(TT)=2450123.7 could be expressed in any of these ways,
10373 * among others:
10374 *<pre>
10375 * date1 date2
10376 *
10377 * 2450123.7 0.0 (JD method)
10378 * 2451545.0 -1421.3 (J2000 method)
10379 * 2400000.5 50123.2 (MJD method)
10380 * 2450123.5 0.2 (date & time method)
10381 *</pre>
10382 * The JD method is the most natural and convenient to use in
10383 * cases where the loss of several decimal digits of resolution
10384 * is acceptable. The J2000 method is best matched to the way
10385 * the argument is handled internally and will deliver the
10386 * optimum resolution. The MJD method and the date & time methods
10387 * are both good compromises between resolution and convenience.
10388 *
10389 * <li> The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt.
10390 *
10391 * <li> The FK5 to Hipparcos transformation is modeled as a pure rotation
10392 * and spin; zonal errors in the FK5 catalogue are not taken into
10393 * account.
10394 *
10395 * <li> It was the intention that Hipparcos should be a close
10396 * approximation to an inertial frame, so that distant objects have
10397 * zero proper motion; such objects have (in general) non-zero
10398 * proper motion in FK5, and this function returns those fictitious
10399 * proper motions.
10400 *
10401 * <li> The position returned by this function is in the FK5 J2000.0
10402 * reference system but at date date1+date2.
10403 *
10404 * <li> See also jauFk52h, jauH2fk5, jauFk5zhz.
10405 *</ol>
10406 *<p>Called:<ul>
10407 * <li>{@link #jauS2c} spherical coordinates to unit vector
10408 * <li>{@link #jauFk5hip} FK5 to Hipparcos rotation and spin
10409 * <li>{@link #jauRxp} product of r-matrix and p-vector
10410 * <li>{@link #jauSxp} multiply p-vector by scalar
10411 * <li>{@link #jauRxr} product of two r-matrices
10412 * <li>{@link #jauTrxp} product of transpose of r-matrix and p-vector
10413 * <li>{@link #jauPxp} vector product of two p-vectors
10414 * <li>{@link #jauPv2s} pv-vector to spherical
10415 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
10416 * </ul>
10417 *<p>Reference:
10418 *
10419 * <p>F.Mignard & M.Froeschle, 2000, Astron.Astrophys. 354, 732-739.
10420 *
10421 *@version 2009 December 17
10422 *
10423 * @since Release 20101201
10424 *
10425 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
10426 *
10427 */
10428 public static CatalogCoords jauHfk5z(double rh, double dh, double date1, double date2)
10429 {
10430 double t, ph[] = new double[3], r5h[][] = new double[3][3], s5h[] = new double[3], sh[] = new double[3], vst[] = new double[3],
10431 rst[][] = new double[3][3], r5ht[][] = new double[3][3], pv5e[][] = new double[2][3], vv[] = new double[3];
10432
10433
10434 /* Time interval from fundamental epoch J2000.0 to given date (JY). */
10435 t = ((date1 - DJ00) + date2) / DJY;
10436
10437 /* Hipparcos barycentric position vector (normalized). */
10438 ph = jauS2c(rh,dh);
10439
10440 /* FK5 to Hipparcos orientation matrix and spin vector. */
10441 jauFk5hip(r5h, s5h);
10442
10443 /* Rotate the spin into the Hipparcos system. */
10444 sh = jauRxp(r5h, s5h);
10445
10446 /* Accumulated Hipparcos wrt FK5 spin over that interval. */
10447 vst = jauSxp(t,s5h);
10448
10449 /* Express the accumulated spin as a rotation matrix. */
10450 rst = jauRv2m(vst);
10451
10452 /* Rotation matrix: accumulated spin, then FK5 to Hipparcos. */
10453 r5ht = jauRxr(r5h, rst);
10454
10455 /* De-orient & de-spin the Hipparcos position into FK5 J2000.0. */
10456 pv5e[0] = jauTrxp(r5ht, ph);
10457
10458 /* Apply spin to the position giving a space motion. */
10459 vv = jauPxp(sh,ph);
10460
10461 /* De-orient & de-spin the Hipparcos space motion into FK5 J2000.0. */
10462 pv5e[1] = jauTrxp(r5ht, vv);
10463
10464 /* FK5 position/velocity pv-vector to spherical. */
10465 SphericalPositionVelocity pvs = jauPv2s(pv5e);
10466 double r5 = jauAnp(pvs.pos.theta);
10467
10468 return new CatalogCoords(r5, pvs.pos.phi, pvs.vel.theta, pvs.vel.phi, 0.0, 0.0);
10469
10470 }
10471
10472
10473 /**
10474 * Initialize an r-matrix to the identity matrix.
10475 *
10476 *<p>This function is derived from the International Astronomical Union's
10477 * SOFA (Standards Of Fundamental Astronomy) software collection.
10478 *
10479 *<p>Status: vector/matrix support function.
10480 *
10481 *<!-- Returned: -->
10482 * @param r double[3][3] <u>returned</u> r-matrix
10483 *
10484 *<p>Called:<ul>
10485 * <li>{@link #jauZr} zero r-matrix
10486 * </ul>
10487 *@version 2008 May 11
10488 *
10489 * @since Release 20101201
10490 *
10491 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
10492 */
10493 public static void jauIr(double r[][])
10494 {
10495 jauZr(r);
10496 r[0][0] = 1.0;
10497 r[1][1] = 1.0;
10498 r[2][2] = 1.0;
10499
10500 return;
10501
10502 }
10503
10504
10505 /**
10506 * Julian Date to Gregorian year, month, day, and fraction of a day.
10507 *
10508 *<p>This function is derived from the International Astronomical Union's
10509 * SOFA (Standards Of Fundamental Astronomy) software collection.
10510 *
10511 *<p>Status: support function.
10512 *
10513 *<!-- Given: -->
10514 * @param dj1 double Julian Date (Notes 1, 2)
10515 * @param dj2 double Julian Date (Notes 1, 2)
10516 *
10517 * Returned (arguments):
10518 * iy int year
10519 * im int month
10520 * id int day
10521 * fd double fraction of day
10522 *
10523 * <!-- Returned (function value): -->
10524 * @return int status:
10525 * 0 = OK
10526 * -1 = unacceptable date (Note 3)
10527 *
10528 * <p>Notes:
10529 * <ol>
10530 *
10531 * <li> The earliest valid date is -68569.5 (-4900 March 1). The
10532 * largest value accepted is 10^9.
10533 *
10534 * <li> The Julian Date is apportioned in any convenient way between
10535 * the arguments dj1 and dj2. For example, JD=2450123.7 could
10536 * be expressed in any of these ways, among others:
10537 *<pre>
10538 * dj1 dj2
10539 *
10540 * 2450123.7 0.0 (JD method)
10541 * 2451545.0 -1421.3 (J2000 method)
10542 * 2400000.5 50123.2 (MJD method)
10543 * 2450123.5 0.2 (date & time method)
10544 *</pre>
10545 * <li> In early eras the conversion is from the "proleptic Gregorian
10546 * calendar"; no account is taken of the date(s) of adoption of
10547 * the Gregorian calendar, nor is the AD/BC numbering convention
10548 * observed.
10549 *</ol>
10550 *<p>Reference:
10551 *
10552 * <p>Explanatory Supplement to the Astronomical Almanac,
10553 * P. Kenneth Seidelmann (ed), University Science Books (1992),
10554 * Section 12.92 (p604).
10555 *
10556 *@version 2008 May 26
10557 *
10558 * @since Release 20101201
10559 *
10560 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
10561 */
10562 public static Calendar jauJd2cal(double dj1, double dj2) throws JSOFAIllegalParameter
10563 {
10564 /* Minimum and maximum allowed JD */
10565 final double djmin = -68569.5;
10566 final double djmax = 1e9;
10567
10568 long jd, l, n, i, k;
10569 double dj, d1, d2, f1, f2, f, d;
10570
10571
10572 /* Verify date is acceptable. */
10573 dj = dj1 + dj2;
10574 if (dj < djmin || dj > djmax) throw new JSOFAIllegalParameter("input julian date out of range", -1);
10575
10576 /* Copy the date, big then small, and re-align to midnight. */
10577 if (dj1 >= dj2) {
10578 d1 = dj1;
10579 d2 = dj2;
10580 } else {
10581 d1 = dj2;
10582 d2 = dj1;
10583 }
10584 d2 -= 0.5;
10585
10586 /* Separate day and fraction. */
10587 f1 = fmod(d1, 1.0);
10588 f2 = fmod(d2, 1.0);
10589 f = fmod(f1 + f2, 1.0);
10590 if (f < 0.0) f += 1.0;
10591 d = floor(d1 - f1) + floor(d2 - f2) + floor(f1 + f2 - f);
10592 jd = (long) floor(d) + 1L;
10593
10594 /* Express day in Gregorian calendar. */
10595 l = jd + 68569L;
10596 n = (4L * l) / 146097L;
10597 l -= (146097L * n + 3L) / 4L;
10598 i = (4000L * (l + 1L)) / 1461001L;
10599 l -= (1461L * i) / 4L - 31L;
10600 k = (80L * l) / 2447L;
10601 int id = (int) (l - (2447L * k) / 80L);
10602 l = k / 11L;
10603 int im = (int) (k + 2L - 12L * l);
10604 int iy = (int) (100L * (n - 49L) + i + l);
10605
10606
10607 return new Calendar(iy, im, id, f);
10608
10609 }
10610
10611 /**
10612 * Julian Date to Gregorian Calendar, expressed in a form convenient
10613 * for formatting messages: rounded to a specified precision.
10614 *
10615 *<p>This function is derived from the International Astronomical Union's
10616 * SOFA (Standards Of Fundamental Astronomy) software collection.
10617 *
10618 *<p>Status: support function.
10619 *
10620 *<!-- Given: -->
10621 * @param ndp int number of decimal places of days in fraction
10622 * @param dj1 double dj1+dj2 = Julian Date (Note 1)
10623 * @param dj2 double dj1+dj2 = Julian Date (Note 1)
10624 *
10625 *<!-- Returned: -->
10626 * @param iymdf int[4] <u>returned</u> year, month, day, fraction in Gregorian calendar
10627 *
10628 *
10629 * <!-- Returned (function value): -->
10630 * @return int status:
10631 * -1 = date out of range
10632 * 0 = OK
10633 * +1 = NDP not 0-9 (interpreted as 0)
10634 *
10635 * <p>Notes:
10636 * <ol>
10637 *
10638 * <li> The Julian Date is apportioned in any convenient way between
10639 * the arguments dj1 and dj2. For example, JD=2450123.7 could
10640 * be expressed in any of these ways, among others:
10641 *<pre>
10642 * dj1 dj2
10643 *
10644 * 2450123.7 0.0 (JD method)
10645 * 2451545.0 -1421.3 (J2000 method)
10646 * 2400000.5 50123.2 (MJD method)
10647 * 2450123.5 0.2 (date & time method)
10648 *</pre>
10649 * <li> In early eras the conversion is from the "Proleptic Gregorian
10650 * Calendar"; no account is taken of the date(s) of adoption of
10651 * the Gregorian Calendar, nor is the AD/BC numbering convention
10652 * observed.
10653 *
10654 * <li> Refer to the function jauJd2cal.
10655 *
10656 * <li> NDP should be 4 or less if internal overflows are to be
10657 * avoided on machines which use 16-bit integers.
10658 *</ol>
10659 *<p>Called:<ul>
10660 * <li>{@link #jauJd2cal} JD to Gregorian calendar
10661 * </ul>
10662 *<p>Reference:
10663 *
10664 * <p>Explanatory Supplement to the Astronomical Almanac,
10665 * P. Kenneth Seidelmann (ed), University Science Books (1992),
10666 * Section 12.92 (p604).
10667 *
10668 *@version 2008 October 28
10669 *
10670 * @since Release 20101201
10671 *
10672 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
10673 */
10674 public static int jauJdcalf(int ndp, double dj1, double dj2, int iymdf[])
10675 {
10676 int j;
10677 double denom, d1, d2, f1, f2, f;
10678
10679
10680 /* Denominator of fraction (e.g. 100 for 2 decimal places). */
10681 if ((ndp >= 0) && (ndp <= 9)) {
10682 j = 0;
10683 denom = pow(10.0, ndp);
10684 } else {
10685 j = 1;
10686 denom = 1.0;
10687 }
10688
10689 /* Copy the date, big then small, and realign to midnight. */
10690 if (dj1 >= dj2) {
10691 d1 = dj1;
10692 d2 = dj2;
10693 } else {
10694 d1 = dj2;
10695 d2 = dj1;
10696 }
10697 d2 -= 0.5;
10698
10699 /* Separate days and fractions. */
10700 f1 = fmod(d1, 1.0);
10701 f2 = fmod(d2, 1.0);
10702 d1 = floor(d1 - f1);
10703 d2 = floor(d2 - f2);
10704
10705 /* Round the total fraction to the specified number of places. */
10706 f = floor((f1 + f2) * denom) / denom;
10707
10708 /* Re-assemble the rounded date and re-align to noon. */
10709 d2 += f + 0.5;
10710
10711 /* Convert to Gregorian Calendar. */
10712 try {
10713 Calendar cal = jauJd2cal(d1, d2);
10714 iymdf[0] = cal.iy;
10715 iymdf[1] = cal.im;
10716 iymdf[2] = cal.id;
10717 iymdf[3] = (int) (cal.fd * denom);
10718 } catch (JSOFAIllegalParameter e) {
10719 j = -1;
10720 }
10721
10722 /* Return the status. */
10723 return j;
10724
10725 }
10726
10727
10728 /**
10729 * Form the matrix of nutation for a given date, IAU 2000A model.
10730 *
10731 *<p>This function is derived from the International Astronomical Union's
10732 * SOFA (Standards Of Fundamental Astronomy) software collection.
10733 *
10734 *<p>Status: support function.
10735 *
10736 *<!-- Given: -->
10737 * @param date1 double TT as a 2-part Julian Date (Note 1)
10738 * @param date2 double TT as a 2-part Julian Date (Note 1)
10739 *
10740 *<!-- Returned: -->
10741 * @return rmatn double[3][3] <u>returned</u> nutation matrix
10742 *
10743 * <p>Notes:
10744 * <ol>
10745 *
10746 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
10747 * convenient way between the two arguments. For example,
10748 * JD(TT)=2450123.7 could be expressed in any of these ways,
10749 * among others:
10750 *<pre>
10751 * date1 date2
10752 *
10753 * 2450123.7 0.0 (JD method)
10754 * 2451545.0 -1421.3 (J2000 method)
10755 * 2400000.5 50123.2 (MJD method)
10756 * 2450123.5 0.2 (date & time method)
10757 *</pre>
10758 * The JD method is the most natural and convenient to use in
10759 * cases where the loss of several decimal digits of resolution
10760 * is acceptable. The J2000 method is best matched to the way
10761 * the argument is handled internally and will deliver the
10762 * optimum resolution. The MJD method and the date & time methods
10763 * are both good compromises between resolution and convenience.
10764 *
10765 * <li> The matrix operates in the sense V(true) = rmatn * V(mean), where
10766 * the p-vector V(true) is with respect to the true equatorial triad
10767 * of date and the p-vector V(mean) is with respect to the mean
10768 * equatorial triad of date.
10769 *
10770 * <li> A faster, but slightly less accurate result (about 1 mas), can be
10771 * obtained by using instead the jauNum00b function.
10772 *</ol>
10773 *<p>Called:<ul>
10774 * <li>{@link #jauPn00a} bias/precession/nutation, IAU 2000A
10775 * </ul>
10776 *<p>Reference:
10777 *
10778 * <p>Explanatory Supplement to the Astronomical Almanac,
10779 * P. Kenneth Seidelmann (ed), University Science Books (1992),
10780 * Section 3.222-3 (p114).
10781 *
10782 *@version 2008 May 12
10783 *
10784 * @since Release 20101201
10785 *
10786 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
10787 */
10788 public static double[][] jauNum00a(double date1, double date2)
10789 {
10790
10791 /* Obtain the required matrix (discarding other results). */
10792 PrecessionNutation pn = jauPn00a(date1, date2);
10793
10794 return pn.rn ;
10795
10796 }
10797
10798
10799 /**
10800 * Form the matrix of nutation for a given date, IAU 2000B model.
10801 *
10802 *<p>This function is derived from the International Astronomical Union's
10803 * SOFA (Standards Of Fundamental Astronomy) software collection.
10804 *
10805 *<p>Status: support function.
10806 *
10807 *<!-- Given: -->
10808 * @param date1 double TT as a 2-part Julian Date (Note 1)
10809 * @param date2 double TT as a 2-part Julian Date (Note 1)
10810 *
10811 *<!-- Returned: -->
10812 * @return rmatn double[3][3] <u>returned</u> nutation matrix
10813 *
10814 * <p>Notes:
10815 * <ol>
10816 *
10817 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
10818 * convenient way between the two arguments. For example,
10819 * JD(TT)=2450123.7 could be expressed in any of these ways,
10820 * among others:
10821 *<pre>
10822 * date1 date2
10823 *
10824 * 2450123.7 0.0 (JD method)
10825 * 2451545.0 -1421.3 (J2000 method)
10826 * 2400000.5 50123.2 (MJD method)
10827 * 2450123.5 0.2 (date & time method)
10828 *</pre>
10829 * The JD method is the most natural and convenient to use in
10830 * cases where the loss of several decimal digits of resolution
10831 * is acceptable. The J2000 method is best matched to the way
10832 * the argument is handled internally and will deliver the
10833 * optimum resolution. The MJD method and the date & time methods
10834 * are both good compromises between resolution and convenience.
10835 *
10836 * <li> The matrix operates in the sense V(true) = rmatn * V(mean), where
10837 * the p-vector V(true) is with respect to the true equatorial triad
10838 * of date and the p-vector V(mean) is with respect to the mean
10839 * equatorial triad of date.
10840 *
10841 * <li> The present function is faster, but slightly less accurate (about
10842 * 1 mas), than the jauNum00a function.
10843 *</ol>
10844 *<p>Called:<ul>
10845 * <li>{@link #jauPn00b} bias/precession/nutation, IAU 2000B
10846 * </ul>
10847 *<p>Reference:
10848 *
10849 * <p>Explanatory Supplement to the Astronomical Almanac,
10850 * P. Kenneth Seidelmann (ed), University Science Books (1992),
10851 * Section 3.222-3 (p114).
10852 *
10853 *@version 2008 May 12
10854 *
10855 * @since Release 20101201
10856 *
10857 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
10858 */
10859 public static double[][] jauNum00b(double date1, double date2)
10860 {
10861
10862 /* Obtain the required matrix (discarding other results). */
10863 PrecessionNutation pn = jauPn00b(date1, date2);
10864
10865 return pn.rn;
10866
10867 }
10868
10869
10870 /**
10871 * Form the matrix of nutation for a given date, IAU 2006/2000A model.
10872 *
10873 *<p>This function is derived from the International Astronomical Union's
10874 * SOFA (Standards Of Fundamental Astronomy) software collection.
10875 *
10876 *<p>Status: support function.
10877 *
10878 *<!-- Given: -->
10879 * @param date1 double TT as a 2-part Julian Date (Note 1)
10880 * @param date2 double TT as a 2-part Julian Date (Note 1)
10881 *
10882 *<!-- Returned: -->
10883 * @return rmatn double[3][3] <u>returned</u> nutation matrix
10884 *
10885 * <p>Notes:
10886 * <ol>
10887 *
10888 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
10889 * convenient way between the two arguments. For example,
10890 * JD(TT)=2450123.7 could be expressed in any of these ways,
10891 * among others:
10892 *<pre>
10893 * date1 date2
10894 *
10895 * 2450123.7 0.0 (JD method)
10896 * 2451545.0 -1421.3 (J2000 method)
10897 * 2400000.5 50123.2 (MJD method)
10898 * 2450123.5 0.2 (date & time method)
10899 *</pre>
10900 * The JD method is the most natural and convenient to use in
10901 * cases where the loss of several decimal digits of resolution
10902 * is acceptable. The J2000 method is best matched to the way
10903 * the argument is handled internally and will deliver the
10904 * optimum resolution. The MJD method and the date & time methods
10905 * are both good compromises between resolution and convenience.
10906 *
10907 * <li> The matrix operates in the sense V(true) = rmatn * V(mean), where
10908 * the p-vector V(true) is with respect to the true equatorial triad
10909 * of date and the p-vector V(mean) is with respect to the mean
10910 * equatorial triad of date.
10911 *</ol>
10912 *<p>Called:<ul>
10913 * <li>{@link #jauObl06} mean obliquity, IAU 2006
10914 * <li>{@link #jauNut06a} nutation, IAU 2006/2000A
10915 * <li>{@link #jauNumat} form nutation matrix
10916 * </ul>
10917 *<p>Reference:
10918 *
10919 * <p>Explanatory Supplement to the Astronomical Almanac,
10920 * P. Kenneth Seidelmann (ed), University Science Books (1992),
10921 * Section 3.222-3 (p114).
10922 *
10923 *@version 2008 May 12
10924 *
10925 * @since Release 20101201
10926 *
10927 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
10928 */
10929 public static double[][] jauNum06a(double date1, double date2)
10930 {
10931 double eps, rmatn[][];
10932
10933
10934 /* Mean obliquity. */
10935 eps = jauObl06(date1, date2);
10936
10937 /* Nutation components. */
10938 NutationTerms nut = jauNut06a(date1, date2);
10939
10940 /* Nutation matrix. */
10941 rmatn = jauNumat(eps, nut.dpsi, nut.deps);
10942
10943 return rmatn;
10944
10945 }
10946
10947
10948 /**
10949 * Form the matrix of nutation.
10950 *
10951 *<p>This function is derived from the International Astronomical Union's
10952 * SOFA (Standards Of Fundamental Astronomy) software collection.
10953 *
10954 *<p>Status: support function.
10955 *
10956 *<!-- Given: -->
10957 * @param epsa double mean obliquity of date (Note 1)
10958 * @param dpsi double nutation (Note 2)
10959 * @param deps double nutation (Note 2)
10960 *
10961 *<!-- Returned: -->
10962 * @return rmatn double[3][3] <u>returned</u> nutation matrix (Note 3)
10963 *
10964 * <p>Notes:
10965 * <ol>
10966 *
10967 *
10968 * <li> The supplied mean obliquity epsa, must be consistent with the
10969 * precession-nutation models from which dpsi and deps were obtained.
10970 *
10971 * <li> The caller is responsible for providing the nutation components;
10972 * they are in longitude and obliquity, in radians and are with
10973 * respect to the equinox and ecliptic of date.
10974 *
10975 * <li> The matrix operates in the sense V(true) = rmatn * V(mean),
10976 * where the p-vector V(true) is with respect to the true
10977 * equatorial triad of date and the p-vector V(mean) is with
10978 * respect to the mean equatorial triad of date.
10979 *</ol>
10980 *<p>Called:<ul>
10981 * <li>{@link #jauIr} initialize r-matrix to identity
10982 * <li>{@link #jauRx} rotate around X-axis
10983 * <li>{@link #jauRz} rotate around Z-axis
10984 * </ul>
10985 *<p>Reference:
10986 *
10987 * <p>Explanatory Supplement to the Astronomical Almanac,
10988 * P. Kenneth Seidelmann (ed), University Science Books (1992),
10989 * Section 3.222-3 (p114).
10990 *
10991 *@version 2008 May 11
10992 *
10993 * @since Release 20101201
10994 *
10995 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
10996 */
10997 public static double[][] jauNumat(double epsa, double dpsi, double deps)
10998 {
10999 double rmatn[][] = new double[3][3];
11000 /* Build the rotation matrix. */
11001 jauIr(rmatn);
11002 jauRx(epsa, rmatn);
11003 jauRz(-dpsi, rmatn);
11004 jauRx(-(epsa + deps), rmatn);
11005
11006 return rmatn;
11007
11008 }
11009 /**
11010 * Nutation Terms.
11011 * .
11012 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 21 Nov 2011
11013 * @version $Revision$ $date$
11014 */
11015 public static class NutationTerms {
11016 /** nutation component in longitude */
11017 public double dpsi;
11018 /** nutation component in obliquity */
11019 public double deps;
11020 public NutationTerms(double dpsi, double deps) {
11021 this.dpsi = dpsi;
11022 this.deps = deps;
11023 }
11024 }
11025 /**
11026 * Nutation, IAU 2000A model (MHB2000 luni-solar and planetary nutation
11027 * with free core nutation omitted).
11028 *
11029 *<p>This function is derived from the International Astronomical Union's
11030 * SOFA (Standards Of Fundamental Astronomy) software collection.
11031 *
11032 *<p>Status: canonical model.
11033 *
11034 *<!-- Given: -->
11035 * @param date1 double TT as a 2-part Julian Date (Note 1)
11036 * @param date2 double TT as a 2-part Julian Date (Note 1)
11037 *
11038 *<!-- Returned: -->
11039 * @return <u>returned</u> nutation, luni-solar + planetary (Note 2)
11040 *
11041 * <p>Notes:
11042 * <ol>
11043 *
11044 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
11045 * convenient way between the two arguments. For example,
11046 * JD(TT)=2450123.7 could be expressed in any of these ways,
11047 * among others:
11048 *<pre>
11049 * date1 date2
11050 *
11051 * 2450123.7 0.0 (JD method)
11052 * 2451545.0 -1421.3 (J2000 method)
11053 * 2400000.5 50123.2 (MJD method)
11054 * 2450123.5 0.2 (date & time method)
11055 *</pre>
11056 * The JD method is the most natural and convenient to use in
11057 * cases where the loss of several decimal digits of resolution
11058 * is acceptable. The J2000 method is best matched to the way
11059 * the argument is handled internally and will deliver the
11060 * optimum resolution. The MJD method and the date & time methods
11061 * are both good compromises between resolution and convenience.
11062 *
11063 * <li> The nutation components in longitude and obliquity are in radians
11064 * and with respect to the equinox and ecliptic of date. The
11065 * obliquity at J2000.0 is assumed to be the Lieske et al. (1977)
11066 * value of 84381.448 arcsec.
11067 *
11068 * Both the luni-solar and planetary nutations are included. The
11069 * latter are due to direct planetary nutations and the
11070 * perturbations of the lunar and terrestrial orbits.
11071 *
11072 * <li> The function computes the MHB2000 nutation series with the
11073 * associated corrections for planetary nutations. It is an
11074 * implementation of the nutation part of the IAU 2000A precession-
11075 * nutation model, formally adopted by the IAU General Assembly in
11076 * 2000, namely MHB2000 (Mathews et al. 2002), but with the free
11077 * core nutation (FCN - see Note 4) omitted.
11078 *
11079 * <li> The full MHB2000 model also contains contributions to the
11080 * nutations in longitude and obliquity due to the free-excitation
11081 * of the free-core-nutation during the period 1979-2000. These FCN
11082 * terms, which are time-dependent and unpredictable, are NOT
11083 * included in the present function and, if required, must be
11084 * independently computed. With the FCN corrections included, the
11085 * present function delivers a pole which is at current epochs
11086 * accurate to a few hundred microarcseconds. The omission of FCN
11087 * introduces further errors of about that size.
11088 *
11089 * <li> The present function provides classical nutation. The MHB2000
11090 * algorithm, from which it is adapted, deals also with (i) the
11091 * offsets between the GCRS and mean poles and (ii) the adjustments
11092 * in longitude and obliquity due to the changed precession rates.
11093 * These additional functions, namely frame bias and precession
11094 * adjustments, are supported by the JSOFA functions jauBi00 and
11095 * jauPr00.
11096 *
11097 * <li> The MHB2000 algorithm also provides "total" nutations, comprising
11098 * the arithmetic sum of the frame bias, precession adjustments,
11099 * luni-solar nutation and planetary nutation. These total
11100 * nutations can be used in combination with an existing IAU 1976
11101 * precession implementation, such as jauPmat76, to deliver GCRS-
11102 * to-true predictions of sub-mas accuracy at current dates.
11103 * However, there are three shortcomings in the MHB2000 model that
11104 * must be taken into account if more accurate or definitive results
11105 * are required (see Wallace 2002):
11106 *
11107 * (i) The MHB2000 total nutations are simply arithmetic sums,
11108 * yet in reality the various components are successive Euler
11109 * rotations. This slight lack of rigor leads to cross terms
11110 * that exceed 1 mas after a century. The rigorous procedure
11111 * is to form the GCRS-to-true rotation matrix by applying the
11112 * bias, precession and nutation in that order.
11113 *
11114 * (ii) Although the precession adjustments are stated to be with
11115 * respect to Lieske et al. (1977), the MHB2000 model does
11116 * not specify which set of Euler angles are to be used and
11117 * how the adjustments are to be applied. The most literal
11118 * and straightforward procedure is to adopt the 4-rotation
11119 * epsilon_0, psi_A, omega_A, xi_A option, and to add DPSIPR
11120 * to psi_A and DEPSPR to both omega_A and eps_A.
11121 *
11122 * (iii) The MHB2000 model predates the determination by Chapront
11123 * et al. (2002) of a 14.6 mas displacement between the
11124 * J2000.0 mean equinox and the origin of the ICRS frame. It
11125 * should, however, be noted that neglecting this displacement
11126 * when calculating star coordinates does not lead to a
11127 * 14.6 mas change in right ascension, only a small second-
11128 * order distortion in the pattern of the precession-nutation
11129 * effect.
11130 *
11131 * For these reasons, the JSOFA functions do not generate the "total
11132 * nutations" directly, though they can of course easily be
11133 * generated by calling jauBi00, jauPr00 and the present function
11134 * and adding the results.
11135 *
11136 * <li> The MHB2000 model contains 41 instances where the same frequency
11137 * appears multiple times, of which 38 are duplicates and three are
11138 * triplicates. To keep the present code close to the original MHB
11139 * algorithm, this small inefficiency has not been corrected.
11140 *</ol>
11141 *<p>Called:<ul>
11142 * <li>{@link #jauFal03} mean anomaly of the Moon
11143 * <li>{@link #jauFaf03} mean argument of the latitude of the Moon
11144 * <li>{@link #jauFaom03} mean longitude of the Moon's ascending node
11145 * <li>{@link #jauFame03} mean longitude of Mercury
11146 * <li>{@link #jauFave03} mean longitude of Venus
11147 * <li>{@link #jauFae03} mean longitude of Earth
11148 * <li>{@link #jauFama03} mean longitude of Mars
11149 * <li>{@link #jauFaju03} mean longitude of Jupiter
11150 * <li>{@link #jauFasa03} mean longitude of Saturn
11151 * <li>{@link #jauFaur03} mean longitude of Uranus
11152 * <li>{@link #jauFapa03} general accumulated precession in longitude
11153 * </ul>
11154 *<p>References:
11155 *
11156 * <p>Chapront, J., Chapront-Touze, M. & Francou, G. 2002,
11157 * Astron.Astrophys. 387, 700
11158 *
11159 * <p>Lieske, J.H., Lederle, T., Fricke, W. & Morando, B. 1977,
11160 * Astron.Astrophys. 58, 1-16
11161 *
11162 * <p>Mathews, P.M., Herring, T.A., Buffet, B.A. 2002, J.Geophys.Res.
11163 * 107, B4. The MHB_2000 code itself was obtained on 9th September
11164 * 2002 from ftp//maia.usno.navy.mil/conv2000/chapter5/IAU2000A.
11165 *
11166 * <p>Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
11167 * Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
11168 *
11169 * <p>Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
11170 * Astron.Astrophys.Supp.Ser. 135, 111
11171 *
11172 * <p>Wallace, P.T., "Software for Implementing the IAU 2000
11173 * Resolutions", in IERS Workshop 5.1 (2002)
11174 *
11175 *@version 2009 December 17
11176 *
11177 * @since Release 20101201
11178 *
11179 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
11180 */
11181 public static NutationTerms jauNut00a(double date1, double date2 )
11182 {
11183 int i;
11184 double t, el, elp, f, d, om, arg, dp, de, sarg, carg,
11185 al, af, ad, aom, alme, alve, alea, alma,
11186 alju, alsa, alur, alne, apa, dpsils, depsls,
11187 dpsipl, depspl;
11188
11189 /* Units of 0.1 microarcsecond to radians */
11190 final double U2R = DAS2R / 1e7;
11191
11192 /* ------------------------- */
11193 /* Luni-Solar nutation model */
11194 /* ------------------------- */
11195
11196 /* The units for the sine and cosine coefficients are */
11197 /* 0.1 microarcsecond and the same per Julian century */
11198
11199 final class NutationModel {
11200 int nl,nlp,nf,nd,nom; /* coefficients of l,l',F,D,Om */
11201 double sp,spt,cp; /* longitude sin, t*sin, cos coefficients */
11202 double ce,cet,se; /* obliquity cos, t*cos, sin coefficients */
11203 public NutationModel(int nl,int nlp,int nf,int nd, int nom,
11204 double sp,double spt,double cp,
11205 double ce,double cet,double se ) {
11206 this.nl = nl;
11207 this.nlp = nlp;
11208 this.nf = nf;
11209 this.nd = nd;
11210 this.nom = nom;
11211 this.sp = sp;
11212 this.spt = spt;
11213 this.cp = cp;
11214 this.ce = ce;
11215 this.cet = cet;
11216 this.se = se;
11217 }
11218 }
11219
11220 NutationModel xls[] = {
11221
11222 /* 1- 10 */
11223 new NutationModel( 0, 0, 0, 0, 1,
11224 -172064161.0, -174666.0, 33386.0, 92052331.0, 9086.0, 15377.0),
11225 new NutationModel( 0, 0, 2,-2, 2,
11226 -13170906.0, -1675.0, -13696.0, 5730336.0, -3015.0, -4587.0),
11227 new NutationModel( 0, 0, 2, 0, 2,-2276413.0,-234.0,2796.0,978459.0,-485.0, 1374.0),
11228 new NutationModel( 0, 0, 0, 0, 2,2074554.0, 207.0, -698.0,-897492.0,470.0, -291.0),
11229 new NutationModel( 0, 1, 0, 0, 0,1475877.0,-3633.0,11817.0,73871.0,-184.0,-1924.0),
11230 new NutationModel( 0, 1, 2,-2, 2,-516821.0,1226.0, -524.0,224386.0,-677.0, -174.0),
11231 new NutationModel( 1, 0, 0, 0, 0, 711159.0, 73.0, -872.0, -6750.0, 0.0, 358.0),
11232 new NutationModel( 0, 0, 2, 0, 1,-387298.0,-367.0, 380.0, 200728.0, 18.0, 318.0),
11233 new NutationModel( 1, 0, 2, 0, 2,-301461.0, -36.0, 816.0, 129025.0,-63.0, 367.0),
11234 new NutationModel( 0,-1, 2,-2, 2, 215829.0,-494.0, 111.0, -95929.0,299.0, 132.0),
11235
11236 /* 11-20 */
11237 new NutationModel( 0, 0, 2,-2, 1, 128227.0, 137.0, 181.0, -68982.0, -9.0, 39.0),
11238 new NutationModel(-1, 0, 2, 0, 2, 123457.0, 11.0, 19.0, -53311.0, 32.0, -4.0),
11239 new NutationModel(-1, 0, 0, 2, 0, 156994.0, 10.0, -168.0, -1235.0, 0.0, 82.0),
11240 new NutationModel( 1, 0, 0, 0, 1, 63110.0, 63.0, 27.0, -33228.0, 0.0, -9.0),
11241 new NutationModel(-1, 0, 0, 0, 1, -57976.0, -63.0, -189.0, 31429.0, 0.0, -75.0),
11242 new NutationModel(-1, 0, 2, 2, 2, -59641.0, -11.0, 149.0, 25543.0,-11.0, 66.0),
11243 new NutationModel( 1, 0, 2, 0, 1, -51613.0, -42.0, 129.0, 26366.0, 0.0, 78.0),
11244 new NutationModel(-2, 0, 2, 0, 1, 45893.0, 50.0, 31.0, -24236.0,-10.0, 20.0),
11245 new NutationModel( 0, 0, 0, 2, 0, 63384.0, 11.0, -150.0, -1220.0, 0.0, 29.0),
11246 new NutationModel( 0, 0, 2, 2, 2, -38571.0, -1.0, 158.0, 16452.0,-11.0, 68.0),
11247
11248 /* 21-30 */
11249 new NutationModel( 0,-2, 2,-2, 2, 32481.0, 0.0, 0.0, -13870.0, 0.0, 0.0),
11250 new NutationModel(-2, 0, 0, 2, 0, -47722.0, 0.0, -18.0, 477.0, 0.0, -25.0),
11251 new NutationModel( 2, 0, 2, 0, 2, -31046.0, -1.0, 131.0, 13238.0,-11.0, 59.0),
11252 new NutationModel( 1, 0, 2,-2, 2, 28593.0, 0.0, -1.0, -12338.0, 10.0, -3.0),
11253 new NutationModel(-1, 0, 2, 0, 1, 20441.0, 21.0, 10.0, -10758.0, 0.0, -3.0),
11254 new NutationModel( 2, 0, 0, 0, 0, 29243.0, 0.0, -74.0, -609.0, 0.0, 13.0),
11255 new NutationModel( 0, 0, 2, 0, 0, 25887.0, 0.0, -66.0, -550.0, 0.0, 11.0),
11256 new NutationModel( 0, 1, 0, 0, 1, -14053.0, -25.0, 79.0, 8551.0, -2.0, -45.0),
11257 new NutationModel(-1, 0, 0, 2, 1, 15164.0, 10.0, 11.0, -8001.0, 0.0, -1.0),
11258 new NutationModel( 0, 2, 2,-2, 2, -15794.0, 72.0, -16.0, 6850.0,-42.0, -5.0),
11259
11260 /* 31-40 */
11261 new NutationModel( 0, 0,-2, 2, 0, 21783.0, 0.0, 13.0, -167.0, 0.0, 13.0),
11262 new NutationModel( 1, 0, 0,-2, 1, -12873.0, -10.0, -37.0, 6953.0, 0.0, -14.0),
11263 new NutationModel( 0,-1, 0, 0, 1, -12654.0, 11.0, 63.0, 6415.0, 0.0, 26.0),
11264 new NutationModel(-1, 0, 2, 2, 1, -10204.0, 0.0, 25.0, 5222.0, 0.0, 15.0),
11265 new NutationModel( 0, 2, 0, 0, 0, 16707.0, -85.0, -10.0, 168.0, -1.0, 10.0),
11266 new NutationModel( 1, 0, 2, 2, 2, -7691.0, 0.0, 44.0, 3268.0, 0.0, 19.0),
11267 new NutationModel(-2, 0, 2, 0, 0, -11024.0, 0.0, -14.0, 104.0, 0.0, 2.0),
11268 new NutationModel( 0, 1, 2, 0, 2, 7566.0, -21.0, -11.0, -3250.0, 0.0, -5.0),
11269 new NutationModel( 0, 0, 2, 2, 1, -6637.0, -11.0, 25.0, 3353.0, 0.0, 14.0),
11270 new NutationModel( 0,-1, 2, 0, 2, -7141.0, 21.0, 8.0, 3070.0, 0.0, 4.0),
11271
11272 /* 41-50 */
11273 new NutationModel( 0, 0, 0, 2, 1, -6302.0, -11.0, 2.0, 3272.0, 0.0, 4.0),
11274 new NutationModel( 1, 0, 2,-2, 1, 5800.0, 10.0, 2.0, -3045.0, 0.0, -1.0),
11275 new NutationModel( 2, 0, 2,-2, 2, 6443.0, 0.0, -7.0, -2768.0, 0.0, -4.0),
11276 new NutationModel(-2, 0, 0, 2, 1, -5774.0, -11.0, -15.0, 3041.0, 0.0, -5.0),
11277 new NutationModel( 2, 0, 2, 0, 1, -5350.0, 0.0, 21.0, 2695.0, 0.0, 12.0),
11278 new NutationModel( 0,-1, 2,-2, 1, -4752.0, -11.0, -3.0, 2719.0, 0.0, -3.0),
11279 new NutationModel( 0, 0, 0,-2, 1, -4940.0, -11.0, -21.0, 2720.0, 0.0, -9.0),
11280 new NutationModel(-1,-1, 0, 2, 0, 7350.0, 0.0, -8.0, -51.0, 0.0, 4.0),
11281 new NutationModel( 2, 0, 0,-2, 1, 4065.0, 0.0, 6.0, -2206.0, 0.0, 1.0),
11282 new NutationModel( 1, 0, 0, 2, 0, 6579.0, 0.0, -24.0, -199.0, 0.0, 2.0),
11283
11284 /* 51-60 */
11285 new NutationModel( 0, 1, 2,-2, 1, 3579.0, 0.0, 5.0, -1900.0, 0.0, 1.0),
11286 new NutationModel( 1,-1, 0, 0, 0, 4725.0, 0.0, -6.0, -41.0, 0.0, 3.0),
11287 new NutationModel(-2, 0, 2, 0, 2, -3075.0, 0.0, -2.0, 1313.0, 0.0, -1.0),
11288 new NutationModel( 3, 0, 2, 0, 2, -2904.0, 0.0, 15.0, 1233.0, 0.0, 7.0),
11289 new NutationModel( 0,-1, 0, 2, 0, 4348.0, 0.0, -10.0, -81.0, 0.0, 2.0),
11290 new NutationModel( 1,-1, 2, 0, 2, -2878.0, 0.0, 8.0, 1232.0, 0.0, 4.0),
11291 new NutationModel( 0, 0, 0, 1, 0, -4230.0, 0.0, 5.0, -20.0, 0.0, -2.0),
11292 new NutationModel(-1,-1, 2, 2, 2, -2819.0, 0.0, 7.0, 1207.0, 0.0, 3.0),
11293 new NutationModel(-1, 0, 2, 0, 0, -4056.0, 0.0, 5.0, 40.0, 0.0, -2.0),
11294 new NutationModel( 0,-1, 2, 2, 2, -2647.0, 0.0, 11.0, 1129.0, 0.0, 5.0),
11295
11296 /* 61-70 */
11297 new NutationModel(-2, 0, 0, 0, 1, -2294.0, 0.0, -10.0, 1266.0, 0.0, -4.0),
11298 new NutationModel( 1, 1, 2, 0, 2, 2481.0, 0.0, -7.0, -1062.0, 0.0, -3.0),
11299 new NutationModel( 2, 0, 0, 0, 1, 2179.0, 0.0, -2.0, -1129.0, 0.0, -2.0),
11300 new NutationModel(-1, 1, 0, 1, 0, 3276.0, 0.0, 1.0, -9.0, 0.0, 0.0),
11301 new NutationModel( 1, 1, 0, 0, 0, -3389.0, 0.0, 5.0, 35.0, 0.0, -2.0),
11302 new NutationModel( 1, 0, 2, 0, 0, 3339.0, 0.0, -13.0, -107.0, 0.0, 1.0),
11303 new NutationModel(-1, 0, 2,-2, 1, -1987.0, 0.0, -6.0, 1073.0, 0.0, -2.0),
11304 new NutationModel( 1, 0, 0, 0, 2, -1981.0, 0.0, 0.0, 854.0, 0.0, 0.0),
11305 new NutationModel(-1, 0, 0, 1, 0, 4026.0, 0.0, -353.0, -553.0, 0.0, -139.0),
11306 new NutationModel( 0, 0, 2, 1, 2, 1660.0, 0.0, -5.0, -710.0, 0.0, -2.0),
11307
11308 /* 71-80 */
11309 new NutationModel(-1, 0, 2, 4, 2, -1521.0, 0.0, 9.0, 647.0, 0.0, 4.0),
11310 new NutationModel(-1, 1, 0, 1, 1, 1314.0, 0.0, 0.0, -700.0, 0.0, 0.0),
11311 new NutationModel( 0,-2, 2,-2, 1, -1283.0, 0.0, 0.0, 672.0, 0.0, 0.0),
11312 new NutationModel( 1, 0, 2, 2, 1, -1331.0, 0.0, 8.0, 663.0, 0.0, 4.0),
11313 new NutationModel(-2, 0, 2, 2, 2, 1383.0, 0.0, -2.0, -594.0, 0.0, -2.0),
11314 new NutationModel(-1, 0, 0, 0, 2, 1405.0, 0.0, 4.0, -610.0, 0.0, 2.0),
11315 new NutationModel( 1, 1, 2,-2, 2, 1290.0, 0.0, 0.0, -556.0, 0.0, 0.0),
11316 new NutationModel(-2, 0, 2, 4, 2, -1214.0, 0.0, 5.0, 518.0, 0.0, 2.0),
11317 new NutationModel(-1, 0, 4, 0, 2, 1146.0, 0.0, -3.0, -490.0, 0.0, -1.0),
11318 new NutationModel( 2, 0, 2,-2, 1, 1019.0, 0.0, -1.0, -527.0, 0.0, -1.0),
11319
11320 /* 81-90 */
11321 new NutationModel( 2, 0, 2, 2, 2, -1100.0, 0.0, 9.0, 465.0, 0.0, 4.0),
11322 new NutationModel( 1, 0, 0, 2, 1, -970.0, 0.0, 2.0, 496.0, 0.0, 1.0),
11323 new NutationModel( 3, 0, 0, 0, 0, 1575.0, 0.0, -6.0, -50.0, 0.0, 0.0),
11324 new NutationModel( 3, 0, 2,-2, 2, 934.0, 0.0, -3.0, -399.0, 0.0, -1.0),
11325 new NutationModel( 0, 0, 4,-2, 2, 922.0, 0.0, -1.0, -395.0, 0.0, -1.0),
11326 new NutationModel( 0, 1, 2, 0, 1, 815.0, 0.0, -1.0, -422.0, 0.0, -1.0),
11327 new NutationModel( 0, 0,-2, 2, 1, 834.0, 0.0, 2.0, -440.0, 0.0, 1.0),
11328 new NutationModel( 0, 0, 2,-2, 3, 1248.0, 0.0, 0.0, -170.0, 0.0, 1.0),
11329 new NutationModel(-1, 0, 0, 4, 0, 1338.0, 0.0, -5.0, -39.0, 0.0, 0.0),
11330 new NutationModel( 2, 0,-2, 0, 1, 716.0, 0.0, -2.0, -389.0, 0.0, -1.0),
11331
11332 /* 91-100 */
11333 new NutationModel(-2, 0, 0, 4, 0, 1282.0, 0.0, -3.0, -23.0, 0.0, 1.0),
11334 new NutationModel(-1,-1, 0, 2, 1, 742.0, 0.0, 1.0, -391.0, 0.0, 0.0),
11335 new NutationModel(-1, 0, 0, 1, 1, 1020.0, 0.0, -25.0, -495.0, 0.0, -10.0),
11336 new NutationModel( 0, 1, 0, 0, 2, 715.0, 0.0, -4.0, -326.0, 0.0, 2.0),
11337 new NutationModel( 0, 0,-2, 0, 1, -666.0, 0.0, -3.0, 369.0, 0.0, -1.0),
11338 new NutationModel( 0,-1, 2, 0, 1, -667.0, 0.0, 1.0, 346.0, 0.0, 1.0),
11339 new NutationModel( 0, 0, 2,-1, 2, -704.0, 0.0, 0.0, 304.0, 0.0, 0.0),
11340 new NutationModel( 0, 0, 2, 4, 2, -694.0, 0.0, 5.0, 294.0, 0.0, 2.0),
11341 new NutationModel(-2,-1, 0, 2, 0, -1014.0, 0.0, -1.0, 4.0, 0.0, -1.0),
11342 new NutationModel( 1, 1, 0,-2, 1, -585.0, 0.0, -2.0, 316.0, 0.0, -1.0),
11343
11344 /* 101-110 */
11345 new NutationModel(-1, 1, 0, 2, 0, -949.0, 0.0, 1.0, 8.0, 0.0, -1.0),
11346 new NutationModel(-1, 1, 0, 1, 2, -595.0, 0.0, 0.0, 258.0, 0.0, 0.0),
11347 new NutationModel( 1,-1, 0, 0, 1, 528.0, 0.0, 0.0, -279.0, 0.0, 0.0),
11348 new NutationModel( 1,-1, 2, 2, 2, -590.0, 0.0, 4.0, 252.0, 0.0, 2.0),
11349 new NutationModel(-1, 1, 2, 2, 2, 570.0, 0.0, -2.0, -244.0, 0.0, -1.0),
11350 new NutationModel( 3, 0, 2, 0, 1, -502.0, 0.0, 3.0, 250.0, 0.0, 2.0),
11351 new NutationModel( 0, 1,-2, 2, 0, -875.0, 0.0, 1.0, 29.0, 0.0, 0.0),
11352 new NutationModel(-1, 0, 0,-2, 1, -492.0, 0.0, -3.0, 275.0, 0.0, -1.0),
11353 new NutationModel( 0, 1, 2, 2, 2, 535.0, 0.0, -2.0, -228.0, 0.0, -1.0),
11354 new NutationModel(-1,-1, 2, 2, 1, -467.0, 0.0, 1.0, 240.0, 0.0, 1.0),
11355
11356 /* 111-120 */
11357 new NutationModel( 0,-1, 0, 0, 2, 591.0, 0.0, 0.0, -253.0, 0.0, 0.0),
11358 new NutationModel( 1, 0, 2,-4, 1, -453.0, 0.0, -1.0, 244.0, 0.0, -1.0),
11359 new NutationModel(-1, 0,-2, 2, 0, 766.0, 0.0, 1.0, 9.0, 0.0, 0.0),
11360 new NutationModel( 0,-1, 2, 2, 1, -446.0, 0.0, 2.0, 225.0, 0.0, 1.0),
11361 new NutationModel( 2,-1, 2, 0, 2, -488.0, 0.0, 2.0, 207.0, 0.0, 1.0),
11362 new NutationModel( 0, 0, 0, 2, 2, -468.0, 0.0, 0.0, 201.0, 0.0, 0.0),
11363 new NutationModel( 1,-1, 2, 0, 1, -421.0, 0.0, 1.0, 216.0, 0.0, 1.0),
11364 new NutationModel(-1, 1, 2, 0, 2, 463.0, 0.0, 0.0, -200.0, 0.0, 0.0),
11365 new NutationModel( 0, 1, 0, 2, 0, -673.0, 0.0, 2.0, 14.0, 0.0, 0.0),
11366 new NutationModel( 0,-1,-2, 2, 0, 658.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11367
11368 /* 121-130 */
11369 new NutationModel( 0, 3, 2,-2, 2, -438.0, 0.0, 0.0, 188.0, 0.0, 0.0),
11370 new NutationModel( 0, 0, 0, 1, 1, -390.0, 0.0, 0.0, 205.0, 0.0, 0.0),
11371 new NutationModel(-1, 0, 2, 2, 0, 639.0, -11.0, -2.0, -19.0, 0.0, 0.0),
11372 new NutationModel( 2, 1, 2, 0, 2, 412.0, 0.0, -2.0, -176.0, 0.0, -1.0),
11373 new NutationModel( 1, 1, 0, 0, 1, -361.0, 0.0, 0.0, 189.0, 0.0, 0.0),
11374 new NutationModel( 1, 1, 2, 0, 1, 360.0, 0.0, -1.0, -185.0, 0.0, -1.0),
11375 new NutationModel( 2, 0, 0, 2, 0, 588.0, 0.0, -3.0, -24.0, 0.0, 0.0),
11376 new NutationModel( 1, 0,-2, 2, 0, -578.0, 0.0, 1.0, 5.0, 0.0, 0.0),
11377 new NutationModel(-1, 0, 0, 2, 2, -396.0, 0.0, 0.0, 171.0, 0.0, 0.0),
11378 new NutationModel( 0, 1, 0, 1, 0, 565.0, 0.0, -1.0, -6.0, 0.0, 0.0),
11379
11380 /* 131-140 */
11381 new NutationModel( 0, 1, 0,-2, 1, -335.0, 0.0, -1.0, 184.0, 0.0, -1.0),
11382 new NutationModel(-1, 0, 2,-2, 2, 357.0, 0.0, 1.0, -154.0, 0.0, 0.0),
11383 new NutationModel( 0, 0, 0,-1, 1, 321.0, 0.0, 1.0, -174.0, 0.0, 0.0),
11384 new NutationModel(-1, 1, 0, 0, 1, -301.0, 0.0, -1.0, 162.0, 0.0, 0.0),
11385 new NutationModel( 1, 0, 2,-1, 2, -334.0, 0.0, 0.0, 144.0, 0.0, 0.0),
11386 new NutationModel( 1,-1, 0, 2, 0, 493.0, 0.0, -2.0, -15.0, 0.0, 0.0),
11387 new NutationModel( 0, 0, 0, 4, 0, 494.0, 0.0, -2.0, -19.0, 0.0, 0.0),
11388 new NutationModel( 1, 0, 2, 1, 2, 337.0, 0.0, -1.0, -143.0, 0.0, -1.0),
11389 new NutationModel( 0, 0, 2, 1, 1, 280.0, 0.0, -1.0, -144.0, 0.0, 0.0),
11390 new NutationModel( 1, 0, 0,-2, 2, 309.0, 0.0, 1.0, -134.0, 0.0, 0.0),
11391
11392 /* 141-150 */
11393 new NutationModel(-1, 0, 2, 4, 1, -263.0, 0.0, 2.0, 131.0, 0.0, 1.0),
11394 new NutationModel( 1, 0,-2, 0, 1, 253.0, 0.0, 1.0, -138.0, 0.0, 0.0),
11395 new NutationModel( 1, 1, 2,-2, 1, 245.0, 0.0, 0.0, -128.0, 0.0, 0.0),
11396 new NutationModel( 0, 0, 2, 2, 0, 416.0, 0.0, -2.0, -17.0, 0.0, 0.0),
11397 new NutationModel(-1, 0, 2,-1, 1, -229.0, 0.0, 0.0, 128.0, 0.0, 0.0),
11398 new NutationModel(-2, 0, 2, 2, 1, 231.0, 0.0, 0.0, -120.0, 0.0, 0.0),
11399 new NutationModel( 4, 0, 2, 0, 2, -259.0, 0.0, 2.0, 109.0, 0.0, 1.0),
11400 new NutationModel( 2,-1, 0, 0, 0, 375.0, 0.0, -1.0, -8.0, 0.0, 0.0),
11401 new NutationModel( 2, 1, 2,-2, 2, 252.0, 0.0, 0.0, -108.0, 0.0, 0.0),
11402 new NutationModel( 0, 1, 2, 1, 2, -245.0, 0.0, 1.0, 104.0, 0.0, 0.0),
11403
11404 /* 151-160 */
11405 new NutationModel( 1, 0, 4,-2, 2, 243.0, 0.0, -1.0, -104.0, 0.0, 0.0),
11406 new NutationModel(-1,-1, 0, 0, 1, 208.0, 0.0, 1.0, -112.0, 0.0, 0.0),
11407 new NutationModel( 0, 1, 0, 2, 1, 199.0, 0.0, 0.0, -102.0, 0.0, 0.0),
11408 new NutationModel(-2, 0, 2, 4, 1, -208.0, 0.0, 1.0, 105.0, 0.0, 0.0),
11409 new NutationModel( 2, 0, 2, 0, 0, 335.0, 0.0, -2.0, -14.0, 0.0, 0.0),
11410 new NutationModel( 1, 0, 0, 1, 0, -325.0, 0.0, 1.0, 7.0, 0.0, 0.0),
11411 new NutationModel(-1, 0, 0, 4, 1, -187.0, 0.0, 0.0, 96.0, 0.0, 0.0),
11412 new NutationModel(-1, 0, 4, 0, 1, 197.0, 0.0, -1.0, -100.0, 0.0, 0.0),
11413 new NutationModel( 2, 0, 2, 2, 1, -192.0, 0.0, 2.0, 94.0, 0.0, 1.0),
11414 new NutationModel( 0, 0, 2,-3, 2, -188.0, 0.0, 0.0, 83.0, 0.0, 0.0),
11415
11416 /* 161-170 */
11417 new NutationModel(-1,-2, 0, 2, 0, 276.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11418 new NutationModel( 2, 1, 0, 0, 0, -286.0, 0.0, 1.0, 6.0, 0.0, 0.0),
11419 new NutationModel( 0, 0, 4, 0, 2, 186.0, 0.0, -1.0, -79.0, 0.0, 0.0),
11420 new NutationModel( 0, 0, 0, 0, 3, -219.0, 0.0, 0.0, 43.0, 0.0, 0.0),
11421 new NutationModel( 0, 3, 0, 0, 0, 276.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11422 new NutationModel( 0, 0, 2,-4, 1, -153.0, 0.0, -1.0, 84.0, 0.0, 0.0),
11423 new NutationModel( 0,-1, 0, 2, 1, -156.0, 0.0, 0.0, 81.0, 0.0, 0.0),
11424 new NutationModel( 0, 0, 0, 4, 1, -154.0, 0.0, 1.0, 78.0, 0.0, 0.0),
11425 new NutationModel(-1,-1, 2, 4, 2, -174.0, 0.0, 1.0, 75.0, 0.0, 0.0),
11426 new NutationModel( 1, 0, 2, 4, 2, -163.0, 0.0, 2.0, 69.0, 0.0, 1.0),
11427
11428 /* 171-180 */
11429 new NutationModel(-2, 2, 0, 2, 0, -228.0, 0.0, 0.0, 1.0, 0.0, 0.0),
11430 new NutationModel(-2,-1, 2, 0, 1, 91.0, 0.0, -4.0, -54.0, 0.0, -2.0),
11431 new NutationModel(-2, 0, 0, 2, 2, 175.0, 0.0, 0.0, -75.0, 0.0, 0.0),
11432 new NutationModel(-1,-1, 2, 0, 2, -159.0, 0.0, 0.0, 69.0, 0.0, 0.0),
11433 new NutationModel( 0, 0, 4,-2, 1, 141.0, 0.0, 0.0, -72.0, 0.0, 0.0),
11434 new NutationModel( 3, 0, 2,-2, 1, 147.0, 0.0, 0.0, -75.0, 0.0, 0.0),
11435 new NutationModel(-2,-1, 0, 2, 1, -132.0, 0.0, 0.0, 69.0, 0.0, 0.0),
11436 new NutationModel( 1, 0, 0,-1, 1, 159.0, 0.0, -28.0, -54.0, 0.0, 11.0),
11437 new NutationModel( 0,-2, 0, 2, 0, 213.0, 0.0, 0.0, -4.0, 0.0, 0.0),
11438 new NutationModel(-2, 0, 0, 4, 1, 123.0, 0.0, 0.0, -64.0, 0.0, 0.0),
11439
11440 /* 181-190 */
11441 new NutationModel(-3, 0, 0, 0, 1, -118.0, 0.0, -1.0, 66.0, 0.0, 0.0),
11442 new NutationModel( 1, 1, 2, 2, 2, 144.0, 0.0, -1.0, -61.0, 0.0, 0.0),
11443 new NutationModel( 0, 0, 2, 4, 1, -121.0, 0.0, 1.0, 60.0, 0.0, 0.0),
11444 new NutationModel( 3, 0, 2, 2, 2, -134.0, 0.0, 1.0, 56.0, 0.0, 1.0),
11445 new NutationModel(-1, 1, 2,-2, 1, -105.0, 0.0, 0.0, 57.0, 0.0, 0.0),
11446 new NutationModel( 2, 0, 0,-4, 1, -102.0, 0.0, 0.0, 56.0, 0.0, 0.0),
11447 new NutationModel( 0, 0, 0,-2, 2, 120.0, 0.0, 0.0, -52.0, 0.0, 0.0),
11448 new NutationModel( 2, 0, 2,-4, 1, 101.0, 0.0, 0.0, -54.0, 0.0, 0.0),
11449 new NutationModel(-1, 1, 0, 2, 1, -113.0, 0.0, 0.0, 59.0, 0.0, 0.0),
11450 new NutationModel( 0, 0, 2,-1, 1, -106.0, 0.0, 0.0, 61.0, 0.0, 0.0),
11451
11452 /* 191-200 */
11453 new NutationModel( 0,-2, 2, 2, 2, -129.0, 0.0, 1.0, 55.0, 0.0, 0.0),
11454 new NutationModel( 2, 0, 0, 2, 1, -114.0, 0.0, 0.0, 57.0, 0.0, 0.0),
11455 new NutationModel( 4, 0, 2,-2, 2, 113.0, 0.0, -1.0, -49.0, 0.0, 0.0),
11456 new NutationModel( 2, 0, 0,-2, 2, -102.0, 0.0, 0.0, 44.0, 0.0, 0.0),
11457 new NutationModel( 0, 2, 0, 0, 1, -94.0, 0.0, 0.0, 51.0, 0.0, 0.0),
11458 new NutationModel( 1, 0, 0,-4, 1, -100.0, 0.0, -1.0, 56.0, 0.0, 0.0),
11459 new NutationModel( 0, 2, 2,-2, 1, 87.0, 0.0, 0.0, -47.0, 0.0, 0.0),
11460 new NutationModel(-3, 0, 0, 4, 0, 161.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11461 new NutationModel(-1, 1, 2, 0, 1, 96.0, 0.0, 0.0, -50.0, 0.0, 0.0),
11462 new NutationModel(-1,-1, 0, 4, 0, 151.0, 0.0, -1.0, -5.0, 0.0, 0.0),
11463
11464 /* 201-210 */
11465 new NutationModel(-1,-2, 2, 2, 2, -104.0, 0.0, 0.0, 44.0, 0.0, 0.0),
11466 new NutationModel(-2,-1, 2, 4, 2, -110.0, 0.0, 0.0, 48.0, 0.0, 0.0),
11467 new NutationModel( 1,-1, 2, 2, 1, -100.0, 0.0, 1.0, 50.0, 0.0, 0.0),
11468 new NutationModel(-2, 1, 0, 2, 0, 92.0, 0.0, -5.0, 12.0, 0.0, -2.0),
11469 new NutationModel(-2, 1, 2, 0, 1, 82.0, 0.0, 0.0, -45.0, 0.0, 0.0),
11470 new NutationModel( 2, 1, 0,-2, 1, 82.0, 0.0, 0.0, -45.0, 0.0, 0.0),
11471 new NutationModel(-3, 0, 2, 0, 1, -78.0, 0.0, 0.0, 41.0, 0.0, 0.0),
11472 new NutationModel(-2, 0, 2,-2, 1, -77.0, 0.0, 0.0, 43.0, 0.0, 0.0),
11473 new NutationModel(-1, 1, 0, 2, 2, 2.0, 0.0, 0.0, 54.0, 0.0, 0.0),
11474 new NutationModel( 0,-1, 2,-1, 2, 94.0, 0.0, 0.0, -40.0, 0.0, 0.0),
11475
11476 /* 211-220 */
11477 new NutationModel(-1, 0, 4,-2, 2, -93.0, 0.0, 0.0, 40.0, 0.0, 0.0),
11478 new NutationModel( 0,-2, 2, 0, 2, -83.0, 0.0, 10.0, 40.0, 0.0, -2.0),
11479 new NutationModel(-1, 0, 2, 1, 2, 83.0, 0.0, 0.0, -36.0, 0.0, 0.0),
11480 new NutationModel( 2, 0, 0, 0, 2, -91.0, 0.0, 0.0, 39.0, 0.0, 0.0),
11481 new NutationModel( 0, 0, 2, 0, 3, 128.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11482 new NutationModel(-2, 0, 4, 0, 2, -79.0, 0.0, 0.0, 34.0, 0.0, 0.0),
11483 new NutationModel(-1, 0,-2, 0, 1, -83.0, 0.0, 0.0, 47.0, 0.0, 0.0),
11484 new NutationModel(-1, 1, 2, 2, 1, 84.0, 0.0, 0.0, -44.0, 0.0, 0.0),
11485 new NutationModel( 3, 0, 0, 0, 1, 83.0, 0.0, 0.0, -43.0, 0.0, 0.0),
11486 new NutationModel(-1, 0, 2, 3, 2, 91.0, 0.0, 0.0, -39.0, 0.0, 0.0),
11487
11488 /* 221-230 */
11489 new NutationModel( 2,-1, 2, 0, 1, -77.0, 0.0, 0.0, 39.0, 0.0, 0.0),
11490 new NutationModel( 0, 1, 2, 2, 1, 84.0, 0.0, 0.0, -43.0, 0.0, 0.0),
11491 new NutationModel( 0,-1, 2, 4, 2, -92.0, 0.0, 1.0, 39.0, 0.0, 0.0),
11492 new NutationModel( 2,-1, 2, 2, 2, -92.0, 0.0, 1.0, 39.0, 0.0, 0.0),
11493 new NutationModel( 0, 2,-2, 2, 0, -94.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11494 new NutationModel(-1,-1, 2,-1, 1, 68.0, 0.0, 0.0, -36.0, 0.0, 0.0),
11495 new NutationModel( 0,-2, 0, 0, 1, -61.0, 0.0, 0.0, 32.0, 0.0, 0.0),
11496 new NutationModel( 1, 0, 2,-4, 2, 71.0, 0.0, 0.0, -31.0, 0.0, 0.0),
11497 new NutationModel( 1,-1, 0,-2, 1, 62.0, 0.0, 0.0, -34.0, 0.0, 0.0),
11498 new NutationModel(-1,-1, 2, 0, 1, -63.0, 0.0, 0.0, 33.0, 0.0, 0.0),
11499
11500 /* 231-240 */
11501 new NutationModel( 1,-1, 2,-2, 2, -73.0, 0.0, 0.0, 32.0, 0.0, 0.0),
11502 new NutationModel(-2,-1, 0, 4, 0, 115.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11503 new NutationModel(-1, 0, 0, 3, 0, -103.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11504 new NutationModel(-2,-1, 2, 2, 2, 63.0, 0.0, 0.0, -28.0, 0.0, 0.0),
11505 new NutationModel( 0, 2, 2, 0, 2, 74.0, 0.0, 0.0, -32.0, 0.0, 0.0),
11506 new NutationModel( 1, 1, 0, 2, 0, -103.0, 0.0, -3.0, 3.0, 0.0, -1.0),
11507 new NutationModel( 2, 0, 2,-1, 2, -69.0, 0.0, 0.0, 30.0, 0.0, 0.0),
11508 new NutationModel( 1, 0, 2, 1, 1, 57.0, 0.0, 0.0, -29.0, 0.0, 0.0),
11509 new NutationModel( 4, 0, 0, 0, 0, 94.0, 0.0, 0.0, -4.0, 0.0, 0.0),
11510 new NutationModel( 2, 1, 2, 0, 1, 64.0, 0.0, 0.0, -33.0, 0.0, 0.0),
11511
11512 /* 241-250 */
11513 new NutationModel( 3,-1, 2, 0, 2, -63.0, 0.0, 0.0, 26.0, 0.0, 0.0),
11514 new NutationModel(-2, 2, 0, 2, 1, -38.0, 0.0, 0.0, 20.0, 0.0, 0.0),
11515 new NutationModel( 1, 0, 2,-3, 1, -43.0, 0.0, 0.0, 24.0, 0.0, 0.0),
11516 new NutationModel( 1, 1, 2,-4, 1, -45.0, 0.0, 0.0, 23.0, 0.0, 0.0),
11517 new NutationModel(-1,-1, 2,-2, 1, 47.0, 0.0, 0.0, -24.0, 0.0, 0.0),
11518 new NutationModel( 0,-1, 0,-1, 1, -48.0, 0.0, 0.0, 25.0, 0.0, 0.0),
11519 new NutationModel( 0,-1, 0,-2, 1, 45.0, 0.0, 0.0, -26.0, 0.0, 0.0),
11520 new NutationModel(-2, 0, 0, 0, 2, 56.0, 0.0, 0.0, -25.0, 0.0, 0.0),
11521 new NutationModel(-2, 0,-2, 2, 0, 88.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11522 new NutationModel(-1, 0,-2, 4, 0, -75.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11523
11524 /* 251-260 */
11525 new NutationModel( 1,-2, 0, 0, 0, 85.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11526 new NutationModel( 0, 1, 0, 1, 1, 49.0, 0.0, 0.0, -26.0, 0.0, 0.0),
11527 new NutationModel(-1, 2, 0, 2, 0, -74.0, 0.0, -3.0, -1.0, 0.0, -1.0),
11528 new NutationModel( 1,-1, 2,-2, 1, -39.0, 0.0, 0.0, 21.0, 0.0, 0.0),
11529 new NutationModel( 1, 2, 2,-2, 2, 45.0, 0.0, 0.0, -20.0, 0.0, 0.0),
11530 new NutationModel( 2,-1, 2,-2, 2, 51.0, 0.0, 0.0, -22.0, 0.0, 0.0),
11531 new NutationModel( 1, 0, 2,-1, 1, -40.0, 0.0, 0.0, 21.0, 0.0, 0.0),
11532 new NutationModel( 2, 1, 2,-2, 1, 41.0, 0.0, 0.0, -21.0, 0.0, 0.0),
11533 new NutationModel(-2, 0, 0,-2, 1, -42.0, 0.0, 0.0, 24.0, 0.0, 0.0),
11534 new NutationModel( 1,-2, 2, 0, 2, -51.0, 0.0, 0.0, 22.0, 0.0, 0.0),
11535
11536 /* 261-270 */
11537 new NutationModel( 0, 1, 2, 1, 1, -42.0, 0.0, 0.0, 22.0, 0.0, 0.0),
11538 new NutationModel( 1, 0, 4,-2, 1, 39.0, 0.0, 0.0, -21.0, 0.0, 0.0),
11539 new NutationModel(-2, 0, 4, 2, 2, 46.0, 0.0, 0.0, -18.0, 0.0, 0.0),
11540 new NutationModel( 1, 1, 2, 1, 2, -53.0, 0.0, 0.0, 22.0, 0.0, 0.0),
11541 new NutationModel( 1, 0, 0, 4, 0, 82.0, 0.0, 0.0, -4.0, 0.0, 0.0),
11542 new NutationModel( 1, 0, 2, 2, 0, 81.0, 0.0, -1.0, -4.0, 0.0, 0.0),
11543 new NutationModel( 2, 0, 2, 1, 2, 47.0, 0.0, 0.0, -19.0, 0.0, 0.0),
11544 new NutationModel( 3, 1, 2, 0, 2, 53.0, 0.0, 0.0, -23.0, 0.0, 0.0),
11545 new NutationModel( 4, 0, 2, 0, 1, -45.0, 0.0, 0.0, 22.0, 0.0, 0.0),
11546 new NutationModel(-2,-1, 2, 0, 0, -44.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11547
11548 /* 271-280 */
11549 new NutationModel( 0, 1,-2, 2, 1, -33.0, 0.0, 0.0, 16.0, 0.0, 0.0),
11550 new NutationModel( 1, 0,-2, 1, 0, -61.0, 0.0, 0.0, 1.0, 0.0, 0.0),
11551 new NutationModel( 0,-1,-2, 2, 1, 28.0, 0.0, 0.0, -15.0, 0.0, 0.0),
11552 new NutationModel( 2,-1, 0,-2, 1, -38.0, 0.0, 0.0, 19.0, 0.0, 0.0),
11553 new NutationModel(-1, 0, 2,-1, 2, -33.0, 0.0, 0.0, 21.0, 0.0, 0.0),
11554 new NutationModel( 1, 0, 2,-3, 2, -60.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11555 new NutationModel( 0, 1, 2,-2, 3, 48.0, 0.0, 0.0, -10.0, 0.0, 0.0),
11556 new NutationModel( 0, 0, 2,-3, 1, 27.0, 0.0, 0.0, -14.0, 0.0, 0.0),
11557 new NutationModel(-1, 0,-2, 2, 1, 38.0, 0.0, 0.0, -20.0, 0.0, 0.0),
11558 new NutationModel( 0, 0, 2,-4, 2, 31.0, 0.0, 0.0, -13.0, 0.0, 0.0),
11559
11560 /* 281-290 */
11561 new NutationModel(-2, 1, 0, 0, 1, -29.0, 0.0, 0.0, 15.0, 0.0, 0.0),
11562 new NutationModel(-1, 0, 0,-1, 1, 28.0, 0.0, 0.0, -15.0, 0.0, 0.0),
11563 new NutationModel( 2, 0, 2,-4, 2, -32.0, 0.0, 0.0, 15.0, 0.0, 0.0),
11564 new NutationModel( 0, 0, 4,-4, 4, 45.0, 0.0, 0.0, -8.0, 0.0, 0.0),
11565 new NutationModel( 0, 0, 4,-4, 2, -44.0, 0.0, 0.0, 19.0, 0.0, 0.0),
11566 new NutationModel(-1,-2, 0, 2, 1, 28.0, 0.0, 0.0, -15.0, 0.0, 0.0),
11567 new NutationModel(-2, 0, 0, 3, 0, -51.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11568 new NutationModel( 1, 0,-2, 2, 1, -36.0, 0.0, 0.0, 20.0, 0.0, 0.0),
11569 new NutationModel(-3, 0, 2, 2, 2, 44.0, 0.0, 0.0, -19.0, 0.0, 0.0),
11570 new NutationModel(-3, 0, 2, 2, 1, 26.0, 0.0, 0.0, -14.0, 0.0, 0.0),
11571
11572 /* 291-300 */
11573 new NutationModel(-2, 0, 2, 2, 0, -60.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11574 new NutationModel( 2,-1, 0, 0, 1, 35.0, 0.0, 0.0, -18.0, 0.0, 0.0),
11575 new NutationModel(-2, 1, 2, 2, 2, -27.0, 0.0, 0.0, 11.0, 0.0, 0.0),
11576 new NutationModel( 1, 1, 0, 1, 0, 47.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11577 new NutationModel( 0, 1, 4,-2, 2, 36.0, 0.0, 0.0, -15.0, 0.0, 0.0),
11578 new NutationModel(-1, 1, 0,-2, 1, -36.0, 0.0, 0.0, 20.0, 0.0, 0.0),
11579 new NutationModel( 0, 0, 0,-4, 1, -35.0, 0.0, 0.0, 19.0, 0.0, 0.0),
11580 new NutationModel( 1,-1, 0, 2, 1, -37.0, 0.0, 0.0, 19.0, 0.0, 0.0),
11581 new NutationModel( 1, 1, 0, 2, 1, 32.0, 0.0, 0.0, -16.0, 0.0, 0.0),
11582 new NutationModel(-1, 2, 2, 2, 2, 35.0, 0.0, 0.0, -14.0, 0.0, 0.0),
11583
11584 /* 301-310 */
11585 new NutationModel( 3, 1, 2,-2, 2, 32.0, 0.0, 0.0, -13.0, 0.0, 0.0),
11586 new NutationModel( 0,-1, 0, 4, 0, 65.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11587 new NutationModel( 2,-1, 0, 2, 0, 47.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11588 new NutationModel( 0, 0, 4, 0, 1, 32.0, 0.0, 0.0, -16.0, 0.0, 0.0),
11589 new NutationModel( 2, 0, 4,-2, 2, 37.0, 0.0, 0.0, -16.0, 0.0, 0.0),
11590 new NutationModel(-1,-1, 2, 4, 1, -30.0, 0.0, 0.0, 15.0, 0.0, 0.0),
11591 new NutationModel( 1, 0, 0, 4, 1, -32.0, 0.0, 0.0, 16.0, 0.0, 0.0),
11592 new NutationModel( 1,-2, 2, 2, 2, -31.0, 0.0, 0.0, 13.0, 0.0, 0.0),
11593 new NutationModel( 0, 0, 2, 3, 2, 37.0, 0.0, 0.0, -16.0, 0.0, 0.0),
11594 new NutationModel(-1, 1, 2, 4, 2, 31.0, 0.0, 0.0, -13.0, 0.0, 0.0),
11595
11596 /* 311-320 */
11597 new NutationModel( 3, 0, 0, 2, 0, 49.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11598 new NutationModel(-1, 0, 4, 2, 2, 32.0, 0.0, 0.0, -13.0, 0.0, 0.0),
11599 new NutationModel( 1, 1, 2, 2, 1, 23.0, 0.0, 0.0, -12.0, 0.0, 0.0),
11600 new NutationModel(-2, 0, 2, 6, 2, -43.0, 0.0, 0.0, 18.0, 0.0, 0.0),
11601 new NutationModel( 2, 1, 2, 2, 2, 26.0, 0.0, 0.0, -11.0, 0.0, 0.0),
11602 new NutationModel(-1, 0, 2, 6, 2, -32.0, 0.0, 0.0, 14.0, 0.0, 0.0),
11603 new NutationModel( 1, 0, 2, 4, 1, -29.0, 0.0, 0.0, 14.0, 0.0, 0.0),
11604 new NutationModel( 2, 0, 2, 4, 2, -27.0, 0.0, 0.0, 12.0, 0.0, 0.0),
11605 new NutationModel( 1, 1,-2, 1, 0, 30.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11606 new NutationModel(-3, 1, 2, 1, 2, -11.0, 0.0, 0.0, 5.0, 0.0, 0.0),
11607
11608 /* 321-330 */
11609 new NutationModel( 2, 0,-2, 0, 2, -21.0, 0.0, 0.0, 10.0, 0.0, 0.0),
11610 new NutationModel(-1, 0, 0, 1, 2, -34.0, 0.0, 0.0, 15.0, 0.0, 0.0),
11611 new NutationModel(-4, 0, 2, 2, 1, -10.0, 0.0, 0.0, 6.0, 0.0, 0.0),
11612 new NutationModel(-1,-1, 0, 1, 0, -36.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11613 new NutationModel( 0, 0,-2, 2, 2, -9.0, 0.0, 0.0, 4.0, 0.0, 0.0),
11614 new NutationModel( 1, 0, 0,-1, 2, -12.0, 0.0, 0.0, 5.0, 0.0, 0.0),
11615 new NutationModel( 0,-1, 2,-2, 3, -21.0, 0.0, 0.0, 5.0, 0.0, 0.0),
11616 new NutationModel(-2, 1, 2, 0, 0, -29.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11617 new NutationModel( 0, 0, 2,-2, 4, -15.0, 0.0, 0.0, 3.0, 0.0, 0.0),
11618 new NutationModel(-2,-2, 0, 2, 0, -20.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11619
11620 /* 331-340 */
11621 new NutationModel(-2, 0,-2, 4, 0, 28.0, 0.0, 0.0, 0.0, 0.0, -2.0),
11622 new NutationModel( 0,-2,-2, 2, 0, 17.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11623 new NutationModel( 1, 2, 0,-2, 1, -22.0, 0.0, 0.0, 12.0, 0.0, 0.0),
11624 new NutationModel( 3, 0, 0,-4, 1, -14.0, 0.0, 0.0, 7.0, 0.0, 0.0),
11625 new NutationModel(-1, 1, 2,-2, 2, 24.0, 0.0, 0.0, -11.0, 0.0, 0.0),
11626 new NutationModel( 1,-1, 2,-4, 1, 11.0, 0.0, 0.0, -6.0, 0.0, 0.0),
11627 new NutationModel( 1, 1, 0,-2, 2, 14.0, 0.0, 0.0, -6.0, 0.0, 0.0),
11628 new NutationModel(-3, 0, 2, 0, 0, 24.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11629 new NutationModel(-3, 0, 2, 0, 2, 18.0, 0.0, 0.0, -8.0, 0.0, 0.0),
11630 new NutationModel(-2, 0, 0, 1, 0, -38.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11631
11632 /* 341-350 */
11633 new NutationModel( 0, 0,-2, 1, 0, -31.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11634 new NutationModel(-3, 0, 0, 2, 1, -16.0, 0.0, 0.0, 8.0, 0.0, 0.0),
11635 new NutationModel(-1,-1,-2, 2, 0, 29.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11636 new NutationModel( 0, 1, 2,-4, 1, -18.0, 0.0, 0.0, 10.0, 0.0, 0.0),
11637 new NutationModel( 2, 1, 0,-4, 1, -10.0, 0.0, 0.0, 5.0, 0.0, 0.0),
11638 new NutationModel( 0, 2, 0,-2, 1, -17.0, 0.0, 0.0, 10.0, 0.0, 0.0),
11639 new NutationModel( 1, 0, 0,-3, 1, 9.0, 0.0, 0.0, -4.0, 0.0, 0.0),
11640 new NutationModel(-2, 0, 2,-2, 2, 16.0, 0.0, 0.0, -6.0, 0.0, 0.0),
11641 new NutationModel(-2,-1, 0, 0, 1, 22.0, 0.0, 0.0, -12.0, 0.0, 0.0),
11642 new NutationModel(-4, 0, 0, 2, 0, 20.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11643
11644 /* 351-360 */
11645 new NutationModel( 1, 1, 0,-4, 1, -13.0, 0.0, 0.0, 6.0, 0.0, 0.0),
11646 new NutationModel(-1, 0, 2,-4, 1, -17.0, 0.0, 0.0, 9.0, 0.0, 0.0),
11647 new NutationModel( 0, 0, 4,-4, 1, -14.0, 0.0, 0.0, 8.0, 0.0, 0.0),
11648 new NutationModel( 0, 3, 2,-2, 2, 0.0, 0.0, 0.0, -7.0, 0.0, 0.0),
11649 new NutationModel(-3,-1, 0, 4, 0, 14.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11650 new NutationModel(-3, 0, 0, 4, 1, 19.0, 0.0, 0.0, -10.0, 0.0, 0.0),
11651 new NutationModel( 1,-1,-2, 2, 0, -34.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11652 new NutationModel(-1,-1, 0, 2, 2, -20.0, 0.0, 0.0, 8.0, 0.0, 0.0),
11653 new NutationModel( 1,-2, 0, 0, 1, 9.0, 0.0, 0.0, -5.0, 0.0, 0.0),
11654 new NutationModel( 1,-1, 0, 0, 2, -18.0, 0.0, 0.0, 7.0, 0.0, 0.0),
11655
11656 /* 361-370 */
11657 new NutationModel( 0, 0, 0, 1, 2, 13.0, 0.0, 0.0, -6.0, 0.0, 0.0),
11658 new NutationModel(-1,-1, 2, 0, 0, 17.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11659 new NutationModel( 1,-2, 2,-2, 2, -12.0, 0.0, 0.0, 5.0, 0.0, 0.0),
11660 new NutationModel( 0,-1, 2,-1, 1, 15.0, 0.0, 0.0, -8.0, 0.0, 0.0),
11661 new NutationModel(-1, 0, 2, 0, 3, -11.0, 0.0, 0.0, 3.0, 0.0, 0.0),
11662 new NutationModel( 1, 1, 0, 0, 2, 13.0, 0.0, 0.0, -5.0, 0.0, 0.0),
11663 new NutationModel(-1, 1, 2, 0, 0, -18.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11664 new NutationModel( 1, 2, 0, 0, 0, -35.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11665 new NutationModel(-1, 2, 2, 0, 2, 9.0, 0.0, 0.0, -4.0, 0.0, 0.0),
11666 new NutationModel(-1, 0, 4,-2, 1, -19.0, 0.0, 0.0, 10.0, 0.0, 0.0),
11667
11668 /* 371-380 */
11669 new NutationModel( 3, 0, 2,-4, 2, -26.0, 0.0, 0.0, 11.0, 0.0, 0.0),
11670 new NutationModel( 1, 2, 2,-2, 1, 8.0, 0.0, 0.0, -4.0, 0.0, 0.0),
11671 new NutationModel( 1, 0, 4,-4, 2, -10.0, 0.0, 0.0, 4.0, 0.0, 0.0),
11672 new NutationModel(-2,-1, 0, 4, 1, 10.0, 0.0, 0.0, -6.0, 0.0, 0.0),
11673 new NutationModel( 0,-1, 0, 2, 2, -21.0, 0.0, 0.0, 9.0, 0.0, 0.0),
11674 new NutationModel(-2, 1, 0, 4, 0, -15.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11675 new NutationModel(-2,-1, 2, 2, 1, 9.0, 0.0, 0.0, -5.0, 0.0, 0.0),
11676 new NutationModel( 2, 0,-2, 2, 0, -29.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11677 new NutationModel( 1, 0, 0, 1, 1, -19.0, 0.0, 0.0, 10.0, 0.0, 0.0),
11678 new NutationModel( 0, 1, 0, 2, 2, 12.0, 0.0, 0.0, -5.0, 0.0, 0.0),
11679
11680 /* 381-390 */
11681 new NutationModel( 1,-1, 2,-1, 2, 22.0, 0.0, 0.0, -9.0, 0.0, 0.0),
11682 new NutationModel(-2, 0, 4, 0, 1, -10.0, 0.0, 0.0, 5.0, 0.0, 0.0),
11683 new NutationModel( 2, 1, 0, 0, 1, -20.0, 0.0, 0.0, 11.0, 0.0, 0.0),
11684 new NutationModel( 0, 1, 2, 0, 0, -20.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11685 new NutationModel( 0,-1, 4,-2, 2, -17.0, 0.0, 0.0, 7.0, 0.0, 0.0),
11686 new NutationModel( 0, 0, 4,-2, 4, 15.0, 0.0, 0.0, -3.0, 0.0, 0.0),
11687 new NutationModel( 0, 2, 2, 0, 1, 8.0, 0.0, 0.0, -4.0, 0.0, 0.0),
11688 new NutationModel(-3, 0, 0, 6, 0, 14.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11689 new NutationModel(-1,-1, 0, 4, 1, -12.0, 0.0, 0.0, 6.0, 0.0, 0.0),
11690 new NutationModel( 1,-2, 0, 2, 0, 25.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11691
11692 /* 391-400 */
11693 new NutationModel(-1, 0, 0, 4, 2, -13.0, 0.0, 0.0, 6.0, 0.0, 0.0),
11694 new NutationModel(-1,-2, 2, 2, 1, -14.0, 0.0, 0.0, 8.0, 0.0, 0.0),
11695 new NutationModel(-1, 0, 0,-2, 2, 13.0, 0.0, 0.0, -5.0, 0.0, 0.0),
11696 new NutationModel( 1, 0,-2,-2, 1, -17.0, 0.0, 0.0, 9.0, 0.0, 0.0),
11697 new NutationModel( 0, 0,-2,-2, 1, -12.0, 0.0, 0.0, 6.0, 0.0, 0.0),
11698 new NutationModel(-2, 0,-2, 0, 1, -10.0, 0.0, 0.0, 5.0, 0.0, 0.0),
11699 new NutationModel( 0, 0, 0, 3, 1, 10.0, 0.0, 0.0, -6.0, 0.0, 0.0),
11700 new NutationModel( 0, 0, 0, 3, 0, -15.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11701 new NutationModel(-1, 1, 0, 4, 0, -22.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11702 new NutationModel(-1,-1, 2, 2, 0, 28.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11703
11704 /* 401-410 */
11705 new NutationModel(-2, 0, 2, 3, 2, 15.0, 0.0, 0.0, -7.0, 0.0, 0.0),
11706 new NutationModel( 1, 0, 0, 2, 2, 23.0, 0.0, 0.0, -10.0, 0.0, 0.0),
11707 new NutationModel( 0,-1, 2, 1, 2, 12.0, 0.0, 0.0, -5.0, 0.0, 0.0),
11708 new NutationModel( 3,-1, 0, 0, 0, 29.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11709 new NutationModel( 2, 0, 0, 1, 0, -25.0, 0.0, 0.0, 1.0, 0.0, 0.0),
11710 new NutationModel( 1,-1, 2, 0, 0, 22.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11711 new NutationModel( 0, 0, 2, 1, 0, -18.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11712 new NutationModel( 1, 0, 2, 0, 3, 15.0, 0.0, 0.0, 3.0, 0.0, 0.0),
11713 new NutationModel( 3, 1, 0, 0, 0, -23.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11714 new NutationModel( 3,-1, 2,-2, 2, 12.0, 0.0, 0.0, -5.0, 0.0, 0.0),
11715
11716 /* 411-420 */
11717 new NutationModel( 2, 0, 2,-1, 1, -8.0, 0.0, 0.0, 4.0, 0.0, 0.0),
11718 new NutationModel( 1, 1, 2, 0, 0, -19.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11719 new NutationModel( 0, 0, 4,-1, 2, -10.0, 0.0, 0.0, 4.0, 0.0, 0.0),
11720 new NutationModel( 1, 2, 2, 0, 2, 21.0, 0.0, 0.0, -9.0, 0.0, 0.0),
11721 new NutationModel(-2, 0, 0, 6, 0, 23.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11722 new NutationModel( 0,-1, 0, 4, 1, -16.0, 0.0, 0.0, 8.0, 0.0, 0.0),
11723 new NutationModel(-2,-1, 2, 4, 1, -19.0, 0.0, 0.0, 9.0, 0.0, 0.0),
11724 new NutationModel( 0,-2, 2, 2, 1, -22.0, 0.0, 0.0, 10.0, 0.0, 0.0),
11725 new NutationModel( 0,-1, 2, 2, 0, 27.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11726 new NutationModel(-1, 0, 2, 3, 1, 16.0, 0.0, 0.0, -8.0, 0.0, 0.0),
11727
11728 /* 421-430 */
11729 new NutationModel(-2, 1, 2, 4, 2, 19.0, 0.0, 0.0, -8.0, 0.0, 0.0),
11730 new NutationModel( 2, 0, 0, 2, 2, 9.0, 0.0, 0.0, -4.0, 0.0, 0.0),
11731 new NutationModel( 2,-2, 2, 0, 2, -9.0, 0.0, 0.0, 4.0, 0.0, 0.0),
11732 new NutationModel(-1, 1, 2, 3, 2, -9.0, 0.0, 0.0, 4.0, 0.0, 0.0),
11733 new NutationModel( 3, 0, 2,-1, 2, -8.0, 0.0, 0.0, 4.0, 0.0, 0.0),
11734 new NutationModel( 4, 0, 2,-2, 1, 18.0, 0.0, 0.0, -9.0, 0.0, 0.0),
11735 new NutationModel(-1, 0, 0, 6, 0, 16.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11736 new NutationModel(-1,-2, 2, 4, 2, -10.0, 0.0, 0.0, 4.0, 0.0, 0.0),
11737 new NutationModel(-3, 0, 2, 6, 2, -23.0, 0.0, 0.0, 9.0, 0.0, 0.0),
11738 new NutationModel(-1, 0, 2, 4, 0, 16.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11739
11740 /* 431-440 */
11741 new NutationModel( 3, 0, 0, 2, 1, -12.0, 0.0, 0.0, 6.0, 0.0, 0.0),
11742 new NutationModel( 3,-1, 2, 0, 1, -8.0, 0.0, 0.0, 4.0, 0.0, 0.0),
11743 new NutationModel( 3, 0, 2, 0, 0, 30.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11744 new NutationModel( 1, 0, 4, 0, 2, 24.0, 0.0, 0.0, -10.0, 0.0, 0.0),
11745 new NutationModel( 5, 0, 2,-2, 2, 10.0, 0.0, 0.0, -4.0, 0.0, 0.0),
11746 new NutationModel( 0,-1, 2, 4, 1, -16.0, 0.0, 0.0, 7.0, 0.0, 0.0),
11747 new NutationModel( 2,-1, 2, 2, 1, -16.0, 0.0, 0.0, 7.0, 0.0, 0.0),
11748 new NutationModel( 0, 1, 2, 4, 2, 17.0, 0.0, 0.0, -7.0, 0.0, 0.0),
11749 new NutationModel( 1,-1, 2, 4, 2, -24.0, 0.0, 0.0, 10.0, 0.0, 0.0),
11750 new NutationModel( 3,-1, 2, 2, 2, -12.0, 0.0, 0.0, 5.0, 0.0, 0.0),
11751
11752 /* 441-450 */
11753 new NutationModel( 3, 0, 2, 2, 1, -24.0, 0.0, 0.0, 11.0, 0.0, 0.0),
11754 new NutationModel( 5, 0, 2, 0, 2, -23.0, 0.0, 0.0, 9.0, 0.0, 0.0),
11755 new NutationModel( 0, 0, 2, 6, 2, -13.0, 0.0, 0.0, 5.0, 0.0, 0.0),
11756 new NutationModel( 4, 0, 2, 2, 2, -15.0, 0.0, 0.0, 7.0, 0.0, 0.0),
11757 new NutationModel( 0,-1, 1,-1, 1, 0.0, 0.0,-1988.0, 0.0, 0.0,-1679.0),
11758 new NutationModel(-1, 0, 1, 0, 3, 0.0, 0.0, -63.0, 0.0, 0.0, -27.0),
11759 new NutationModel( 0,-2, 2,-2, 3, -4.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11760 new NutationModel( 1, 0,-1, 0, 1, 0.0, 0.0, 5.0, 0.0, 0.0, 4.0),
11761 new NutationModel( 2,-2, 0,-2, 1, 5.0, 0.0, 0.0, -3.0, 0.0, 0.0),
11762 new NutationModel(-1, 0, 1, 0, 2, 0.0, 0.0, 364.0, 0.0, 0.0, 176.0),
11763
11764 /* 451-460 */
11765 new NutationModel(-1, 0, 1, 0, 1, 0.0, 0.0,-1044.0, 0.0, 0.0, -891.0),
11766 new NutationModel(-1,-1, 2,-1, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0),
11767 new NutationModel(-2, 2, 0, 2, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11768 new NutationModel(-1, 0, 1, 0, 0, 0.0, 0.0, 330.0, 0.0, 0.0, 0.0),
11769 new NutationModel(-4, 1, 2, 2, 2, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11770 new NutationModel(-3, 0, 2, 1, 1, 3.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11771 new NutationModel(-2,-1, 2, 0, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0),
11772 new NutationModel( 1, 0,-2, 1, 1, -5.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11773 new NutationModel( 2,-1,-2, 0, 1, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11774 new NutationModel(-4, 0, 2, 2, 0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11775
11776 /* 461-470 */
11777 new NutationModel(-3, 1, 0, 3, 0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11778 new NutationModel(-1, 0,-1, 2, 0, 0.0, 0.0, 5.0, 0.0, 0.0, 0.0),
11779 new NutationModel( 0,-2, 0, 0, 2, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0),
11780 new NutationModel( 0,-2, 0, 0, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11781 new NutationModel(-3, 0, 0, 3, 0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11782 new NutationModel(-2,-1, 0, 2, 2, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11783 new NutationModel(-1, 0,-2, 3, 0, -7.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11784 new NutationModel(-4, 0, 0, 4, 0, -12.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11785 new NutationModel( 2, 1,-2, 0, 1, 5.0, 0.0, 0.0, -3.0, 0.0, 0.0),
11786 new NutationModel( 2,-1, 0,-2, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11787
11788 /* 471-480 */
11789 new NutationModel( 0, 0, 1,-1, 0, -5.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11790 new NutationModel(-1, 2, 0, 1, 0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11791 new NutationModel(-2, 1, 2, 0, 2, -7.0, 0.0, 0.0, 3.0, 0.0, 0.0),
11792 new NutationModel( 1, 1, 0,-1, 1, 7.0, 0.0, 0.0, -4.0, 0.0, 0.0),
11793 new NutationModel( 1, 0, 1,-2, 1, 0.0, 0.0, -12.0, 0.0, 0.0, -10.0),
11794 new NutationModel( 0, 2, 0, 0, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11795 new NutationModel( 1,-1, 2,-3, 1, 3.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11796 new NutationModel(-1, 1, 2,-1, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11797 new NutationModel(-2, 0, 4,-2, 2, -7.0, 0.0, 0.0, 3.0, 0.0, 0.0),
11798 new NutationModel(-2, 0, 4,-2, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11799
11800 /* 481-490 */
11801 new NutationModel(-2,-2, 0, 2, 1, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0),
11802 new NutationModel(-2, 0,-2, 4, 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11803 new NutationModel( 1, 2, 2,-4, 1, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0),
11804 new NutationModel( 1, 1, 2,-4, 2, 7.0, 0.0, 0.0, -3.0, 0.0, 0.0),
11805 new NutationModel(-1, 2, 2,-2, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11806 new NutationModel( 2, 0, 0,-3, 1, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11807 new NutationModel(-1, 2, 0, 0, 1, -5.0, 0.0, 0.0, 3.0, 0.0, 0.0),
11808 new NutationModel( 0, 0, 0,-2, 0, 5.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11809 new NutationModel(-1,-1, 2,-2, 2, -5.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11810 new NutationModel(-1, 1, 0, 0, 2, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11811
11812 /* 491-500 */
11813 new NutationModel( 0, 0, 0,-1, 2, -8.0, 0.0, 0.0, 3.0, 0.0, 0.0),
11814 new NutationModel(-2, 1, 0, 1, 0, 9.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11815 new NutationModel( 1,-2, 0,-2, 1, 6.0, 0.0, 0.0, -3.0, 0.0, 0.0),
11816 new NutationModel( 1, 0,-2, 0, 2, -5.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11817 new NutationModel(-3, 1, 0, 2, 0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11818 new NutationModel(-1, 1,-2, 2, 0, -7.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11819 new NutationModel(-1,-1, 0, 0, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0),
11820 new NutationModel(-3, 0, 0, 2, 0, 5.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11821 new NutationModel(-3,-1, 0, 2, 0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11822 new NutationModel( 2, 0, 2,-6, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11823
11824 /* 501-510 */
11825 new NutationModel( 0, 1, 2,-4, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11826 new NutationModel( 2, 0, 0,-4, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11827 new NutationModel(-2, 1, 2,-2, 1, -5.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11828 new NutationModel( 0,-1, 2,-4, 1, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11829 new NutationModel( 0, 1, 0,-2, 2, 9.0, 0.0, 0.0, -3.0, 0.0, 0.0),
11830 new NutationModel(-1, 0, 0,-2, 0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11831 new NutationModel( 2, 0,-2,-2, 1, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11832 new NutationModel(-4, 0, 2, 0, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11833 new NutationModel(-1,-1, 0,-1, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11834 new NutationModel( 0, 0,-2, 0, 2, 9.0, 0.0, 0.0, -3.0, 0.0, 0.0),
11835
11836 /* 511-520 */
11837 new NutationModel(-3, 0, 0, 1, 0, -4.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11838 new NutationModel(-1, 0,-2, 1, 0, -4.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11839 new NutationModel(-2, 0,-2, 2, 1, 3.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11840 new NutationModel( 0, 0,-4, 2, 0, 8.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11841 new NutationModel(-2,-1,-2, 2, 0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11842 new NutationModel( 1, 0, 2,-6, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11843 new NutationModel(-1, 0, 2,-4, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11844 new NutationModel( 1, 0, 0,-4, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11845 new NutationModel( 2, 1, 2,-4, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0),
11846 new NutationModel( 2, 1, 2,-4, 1, 6.0, 0.0, 0.0, -3.0, 0.0, 0.0),
11847
11848 /* 521-530 */
11849 new NutationModel( 0, 1, 4,-4, 4, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11850 new NutationModel( 0, 1, 4,-4, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0),
11851 new NutationModel(-1,-1,-2, 4, 0, -7.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11852 new NutationModel(-1,-3, 0, 2, 0, 9.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11853 new NutationModel(-1, 0,-2, 4, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11854 new NutationModel(-2,-1, 0, 3, 0, -3.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11855 new NutationModel( 0, 0,-2, 3, 0, -4.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11856 new NutationModel(-2, 0, 0, 3, 1, -5.0, 0.0, 0.0, 3.0, 0.0, 0.0),
11857 new NutationModel( 0,-1, 0, 1, 0, -13.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11858 new NutationModel(-3, 0, 2, 2, 0, -7.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11859
11860 /* 531-540 */
11861 new NutationModel( 1, 1,-2, 2, 0, 10.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11862 new NutationModel(-1, 1, 0, 2, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11863 new NutationModel( 1,-2, 2,-2, 1, 10.0, 0.0, 13.0, 6.0, 0.0, -5.0),
11864 new NutationModel( 0, 0, 1, 0, 2, 0.0, 0.0, 30.0, 0.0, 0.0, 14.0),
11865 new NutationModel( 0, 0, 1, 0, 1, 0.0, 0.0, -162.0, 0.0, 0.0, -138.0),
11866 new NutationModel( 0, 0, 1, 0, 0, 0.0, 0.0, 75.0, 0.0, 0.0, 0.0),
11867 new NutationModel(-1, 2, 0, 2, 1, -7.0, 0.0, 0.0, 4.0, 0.0, 0.0),
11868 new NutationModel( 0, 0, 2, 0, 2, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11869 new NutationModel(-2, 0, 2, 0, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11870 new NutationModel( 2, 0, 0,-1, 1, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11871
11872 /* 541-550 */
11873 new NutationModel( 3, 0, 0,-2, 1, 5.0, 0.0, 0.0, -3.0, 0.0, 0.0),
11874 new NutationModel( 1, 0, 2,-2, 3, -3.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11875 new NutationModel( 1, 2, 0, 0, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11876 new NutationModel( 2, 0, 2,-3, 2, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11877 new NutationModel(-1, 1, 4,-2, 2, -5.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11878 new NutationModel(-2,-2, 0, 4, 0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11879 new NutationModel( 0,-3, 0, 2, 0, 9.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11880 new NutationModel( 0, 0,-2, 4, 0, 5.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11881 new NutationModel(-1,-1, 0, 3, 0, -7.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11882 new NutationModel(-2, 0, 0, 4, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0),
11883
11884 /* 551-560 */
11885 new NutationModel(-1, 0, 0, 3, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11886 new NutationModel( 2,-2, 0, 0, 0, 7.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11887 new NutationModel( 1,-1, 0, 1, 0, -4.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11888 new NutationModel(-1, 0, 0, 2, 0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11889 new NutationModel( 0,-2, 2, 0, 1, -6.0, 0.0, -3.0, 3.0, 0.0, 1.0),
11890 new NutationModel(-1, 0, 1, 2, 1, 0.0, 0.0, -3.0, 0.0, 0.0, -2.0),
11891 new NutationModel(-1, 1, 0, 3, 0, 11.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11892 new NutationModel(-1,-1, 2, 1, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11893 new NutationModel( 0,-1, 2, 0, 0, 11.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11894 new NutationModel(-2, 1, 2, 2, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11895
11896 /* 561-570 */
11897 new NutationModel( 2,-2, 2,-2, 2, -1.0, 0.0, 3.0, 3.0, 0.0, -1.0),
11898 new NutationModel( 1, 1, 0, 1, 1, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11899 new NutationModel( 1, 0, 1, 0, 1, 0.0, 0.0, -13.0, 0.0, 0.0, -11.0),
11900 new NutationModel( 1, 0, 1, 0, 0, 3.0, 0.0, 6.0, 0.0, 0.0, 0.0),
11901 new NutationModel( 0, 2, 0, 2, 0, -7.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11902 new NutationModel( 2,-1, 2,-2, 1, 5.0, 0.0, 0.0, -3.0, 0.0, 0.0),
11903 new NutationModel( 0,-1, 4,-2, 1, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0),
11904 new NutationModel( 0, 0, 4,-2, 3, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11905 new NutationModel( 0, 1, 4,-2, 1, 5.0, 0.0, 0.0, -3.0, 0.0, 0.0),
11906 new NutationModel( 4, 0, 2,-4, 2, -7.0, 0.0, 0.0, 3.0, 0.0, 0.0),
11907
11908 /* 571-580 */
11909 new NutationModel( 2, 2, 2,-2, 2, 8.0, 0.0, 0.0, -3.0, 0.0, 0.0),
11910 new NutationModel( 2, 0, 4,-4, 2, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11911 new NutationModel(-1,-2, 0, 4, 0, 11.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11912 new NutationModel(-1,-3, 2, 2, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0),
11913 new NutationModel(-3, 0, 2, 4, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11914 new NutationModel(-3, 0, 2,-2, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11915 new NutationModel(-1,-1, 0,-2, 1, 8.0, 0.0, 0.0, -4.0, 0.0, 0.0),
11916 new NutationModel(-3, 0, 0, 0, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11917 new NutationModel(-3, 0,-2, 2, 0, 11.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11918 new NutationModel( 0, 1, 0,-4, 1, -6.0, 0.0, 0.0, 3.0, 0.0, 0.0),
11919
11920 /* 581-590 */
11921 new NutationModel(-2, 1, 0,-2, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11922 new NutationModel(-4, 0, 0, 0, 1, -8.0, 0.0, 0.0, 4.0, 0.0, 0.0),
11923 new NutationModel(-1, 0, 0,-4, 1, -7.0, 0.0, 0.0, 3.0, 0.0, 0.0),
11924 new NutationModel(-3, 0, 0,-2, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11925 new NutationModel( 0, 0, 0, 3, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11926 new NutationModel(-1, 1, 0, 4, 1, 6.0, 0.0, 0.0, -3.0, 0.0, 0.0),
11927 new NutationModel( 1,-2, 2, 0, 1, -6.0, 0.0, 0.0, 3.0, 0.0, 0.0),
11928 new NutationModel( 0, 1, 0, 3, 0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11929 new NutationModel(-1, 0, 2, 2, 3, 6.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11930 new NutationModel( 0, 0, 2, 2, 2, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11931
11932 /* 591-600 */
11933 new NutationModel(-2, 0, 2, 2, 2, -5.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11934 new NutationModel(-1, 1, 2, 2, 0, -4.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11935 new NutationModel( 3, 0, 0, 0, 2, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11936 new NutationModel( 2, 1, 0, 1, 0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11937 new NutationModel( 2,-1, 2,-1, 2, 6.0, 0.0, 0.0, -3.0, 0.0, 0.0),
11938 new NutationModel( 0, 0, 2, 0, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11939 new NutationModel( 0, 0, 3, 0, 3, 0.0, 0.0, -26.0, 0.0, 0.0, -11.0),
11940 new NutationModel( 0, 0, 3, 0, 2, 0.0, 0.0, -10.0, 0.0, 0.0, -5.0),
11941 new NutationModel(-1, 2, 2, 2, 1, 5.0, 0.0, 0.0, -3.0, 0.0, 0.0),
11942 new NutationModel(-1, 0, 4, 0, 0, -13.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11943
11944 /* 601-610 */
11945 new NutationModel( 1, 2, 2, 0, 1, 3.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11946 new NutationModel( 3, 1, 2,-2, 1, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11947 new NutationModel( 1, 1, 4,-2, 2, 7.0, 0.0, 0.0, -3.0, 0.0, 0.0),
11948 new NutationModel(-2,-1, 0, 6, 0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11949 new NutationModel( 0,-2, 0, 4, 0, 5.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11950 new NutationModel(-2, 0, 0, 6, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11951 new NutationModel(-2,-2, 2, 4, 2, -6.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11952 new NutationModel( 0,-3, 2, 2, 2, -5.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11953 new NutationModel( 0, 0, 0, 4, 2, -7.0, 0.0, 0.0, 3.0, 0.0, 0.0),
11954 new NutationModel(-1,-1, 2, 3, 2, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11955
11956 /* 611-620 */
11957 new NutationModel(-2, 0, 2, 4, 0, 13.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11958 new NutationModel( 2,-1, 0, 2, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11959 new NutationModel( 1, 0, 0, 3, 0, -3.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11960 new NutationModel( 0, 1, 0, 4, 1, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11961 new NutationModel( 0, 1, 0, 4, 0, -11.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11962 new NutationModel( 1,-1, 2, 1, 2, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11963 new NutationModel( 0, 0, 2, 2, 3, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11964 new NutationModel( 1, 0, 2, 2, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11965 new NutationModel(-1, 0, 2, 2, 2, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11966 new NutationModel(-2, 0, 4, 2, 1, 6.0, 0.0, 0.0, -3.0, 0.0, 0.0),
11967
11968 /* 621-630 */
11969 new NutationModel( 2, 1, 0, 2, 1, 3.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11970 new NutationModel( 2, 1, 0, 2, 0, -12.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11971 new NutationModel( 2,-1, 2, 0, 0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11972 new NutationModel( 1, 0, 2, 1, 0, -3.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11973 new NutationModel( 0, 1, 2, 2, 0, -4.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11974 new NutationModel( 2, 0, 2, 0, 3, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11975 new NutationModel( 3, 0, 2, 0, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11976 new NutationModel( 1, 0, 2, 0, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0),
11977 new NutationModel( 1, 0, 3, 0, 3, 0.0, 0.0, -5.0, 0.0, 0.0, -2.0),
11978 new NutationModel( 1, 1, 2, 1, 1, -7.0, 0.0, 0.0, 4.0, 0.0, 0.0),
11979
11980 /* 631-640 */
11981 new NutationModel( 0, 2, 2, 2, 2, 6.0, 0.0, 0.0, -3.0, 0.0, 0.0),
11982 new NutationModel( 2, 1, 2, 0, 0, -3.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11983 new NutationModel( 2, 0, 4,-2, 1, 5.0, 0.0, 0.0, -3.0, 0.0, 0.0),
11984 new NutationModel( 4, 1, 2,-2, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11985 new NutationModel(-1,-1, 0, 6, 0, 3.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11986 new NutationModel(-3,-1, 2, 6, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0),
11987 new NutationModel(-1, 0, 0, 6, 1, -5.0, 0.0, 0.0, 3.0, 0.0, 0.0),
11988 new NutationModel(-3, 0, 2, 6, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11989 new NutationModel( 1,-1, 0, 4, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11990 new NutationModel( 1,-1, 0, 4, 0, 12.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11991
11992 /* 641-650 */
11993 new NutationModel(-2, 0, 2, 5, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0),
11994 new NutationModel( 1,-2, 2, 2, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
11995 new NutationModel( 3,-1, 0, 2, 0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11996 new NutationModel( 1,-1, 2, 2, 0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0),
11997 new NutationModel( 0, 0, 2, 3, 1, 5.0, 0.0, 0.0, -3.0, 0.0, 0.0),
11998 new NutationModel(-1, 1, 2, 4, 1, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0),
11999 new NutationModel( 0, 1, 2, 3, 2, -6.0, 0.0, 0.0, 3.0, 0.0, 0.0),
12000 new NutationModel(-1, 0, 4, 2, 1, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12001 new NutationModel( 2, 0, 2, 1, 1, 6.0, 0.0, 0.0, -3.0, 0.0, 0.0),
12002 new NutationModel( 5, 0, 0, 0, 0, 6.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12003
12004 /* 651-660 */
12005 new NutationModel( 2, 1, 2, 1, 2, -6.0, 0.0, 0.0, 3.0, 0.0, 0.0),
12006 new NutationModel( 1, 0, 4, 0, 1, 3.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12007 new NutationModel( 3, 1, 2, 0, 1, 7.0, 0.0, 0.0, -4.0, 0.0, 0.0),
12008 new NutationModel( 3, 0, 4,-2, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12009 new NutationModel(-2,-1, 2, 6, 2, -5.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12010 new NutationModel( 0, 0, 0, 6, 0, 5.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12011 new NutationModel( 0,-2, 2, 4, 2, -6.0, 0.0, 0.0, 3.0, 0.0, 0.0),
12012 new NutationModel(-2, 0, 2, 6, 1, -6.0, 0.0, 0.0, 3.0, 0.0, 0.0),
12013 new NutationModel( 2, 0, 0, 4, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12014 new NutationModel( 2, 0, 0, 4, 0, 10.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12015
12016 /* 661-670 */
12017 new NutationModel( 2,-2, 2, 2, 2, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12018 new NutationModel( 0, 0, 2, 4, 0, 7.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12019 new NutationModel( 1, 0, 2, 3, 2, 7.0, 0.0, 0.0, -3.0, 0.0, 0.0),
12020 new NutationModel( 4, 0, 0, 2, 0, 4.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12021 new NutationModel( 2, 0, 2, 2, 0, 11.0, 0.0, 0.0, 0.0, 0.0, 0.0),
12022 new NutationModel( 0, 0, 4, 2, 2, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12023 new NutationModel( 4,-1, 2, 0, 2, -6.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12024 new NutationModel( 3, 0, 2, 1, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12025 new NutationModel( 2, 1, 2, 2, 1, 3.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12026 new NutationModel( 4, 1, 2, 0, 2, 5.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12027
12028 /* 671-678 */
12029 new NutationModel(-1,-1, 2, 6, 2, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12030 new NutationModel(-1, 0, 2, 6, 1, -4.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12031 new NutationModel( 1,-1, 2, 4, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0),
12032 new NutationModel( 1, 1, 2, 4, 2, 4.0, 0.0, 0.0, -2.0, 0.0, 0.0),
12033 new NutationModel( 3, 1, 2, 2, 2, 3.0, 0.0, 0.0, -1.0, 0.0, 0.0),
12034 new NutationModel( 5, 0, 2, 0, 1, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0),
12035 new NutationModel( 2,-1, 2, 4, 2, -3.0, 0.0, 0.0, 1.0, 0.0, 0.0),
12036 new NutationModel( 2, 0, 2, 4, 1, -3.0, 0.0, 0.0, 2.0, 0.0, 0.0)
12037 };
12038
12039 /* Number of terms in the luni-solar nutation model */
12040 final int NLS = xls.length;
12041
12042 /* ------------------------ */
12043 /* Planetary nutation model */
12044 /* ------------------------ */
12045
12046 /* The units for the sine and cosine coefficients are */
12047 /* 0.1 microarcsecond */
12048
12049 final class PlanetaryNutModel {
12050 final int nl, /* coefficients of l, F, D and Omega */
12051 nf,
12052 nd,
12053 nom,
12054 nme, /* coefficients of planetary longitudes */
12055 nve,
12056 nea,
12057 nma,
12058 nju,
12059 nsa,
12060 nur,
12061 nne,
12062 npa; /* coefficient of general precession */
12063 final int sp,cp; /* longitude sin, cos coefficients */
12064 final int se,ce; /* obliquity sin, cos coefficients */
12065 public PlanetaryNutModel( int nl,
12066 int nf,
12067 int nd,
12068 int nom,
12069 int nme,
12070 int nve,
12071 int nea,
12072 int nma,
12073 int nju,
12074 int nsa,
12075 int nur,
12076 int nne,
12077 int npa,
12078 int sp,int cp,
12079 int se,int ce
12080 ) {
12081 this.nl = nl; /* coefficients of l, F, D and Omega */
12082 this.nf = nf;
12083 this.nd = nd;
12084 this.nom = nom;
12085 this.nme = nme; /* coefficients of planetary longitudes */
12086 this.nve = nve;
12087 this.nea = nea;
12088 this.nma = nma;
12089 this.nju = nju;
12090 this.nsa = nsa;
12091 this.nur = nur;
12092 this.nne = nne;
12093 this.npa = npa; /* coefficient of general precession */
12094 this.sp = sp; this.cp = cp; /* longitude sin, cos coefficients */
12095 this.se = se; this.ce = ce; /* obliquity sin, cos coefficients */
12096
12097 }
12098 }
12099
12100 PlanetaryNutModel xpl[] = {
12101
12102 /* 1-10 */
12103 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 8,-16, 4, 5, 0, 0, 0, 1440, 0, 0, 0),
12104 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -8, 16,-4,-5, 0, 0, 2, 56,-117, -42, -40),
12105 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 8,-16, 4, 5, 0, 0, 2, 125, -43, 0, -54),
12106 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,-1, 2, 2, 0, 5, 0, 0),
12107 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -4, 8,-1,-5, 0, 0, 2, 3, -7, -3, 0),
12108 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, 1, 3, 0, 0, -2),
12109 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, 3, -8, 3, 0, 0, 0, 0, -114, 0, 0, 61),
12110 new PlanetaryNutModel(-1, 0, 0, 0, 0, 10, -3, 0, 0, 0, 0, 0, 0, -219, 89, 0, 0),
12111 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0,-2, 6,-3, 0, 2, -3, 0, 0, 0),
12112 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0, -462,1604, 0, 0),
12113
12114 /* 11-20 */
12115 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -5, 8,-3, 0, 0, 0, 0, 99, 0, 0, -53),
12116 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -4, 8,-3, 0, 0, 0, 1, -3, 0, 0, 2),
12117 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, -8, 1, 5, 0, 0, 2, 0, 6, 2, 0),
12118 new PlanetaryNutModel( 0, 0, 0, 0, 0, -5, 6, 4, 0, 0, 0, 0, 2, 3, 0, 0, 0),
12119 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 2,-5, 0, 0, 2, -12, 0, 0, 0),
12120 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 2,-5, 0, 0, 1, 14,-218, 117, 8),
12121 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0, 2,-5, 0, 0, 0, 31,-481, -257, -17),
12122 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 2,-5, 0, 0, 0, -491, 128, 0, 0),
12123 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0,-2, 5, 0, 0, 0,-3084,5123, 2735,1647),
12124 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0,-2, 5, 0, 0, 1,-1444,2409,-1286,-771),
12125
12126 /* 21-30 */
12127 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0,-2, 5, 0, 0, 2, 11, -24, -11, -9),
12128 new PlanetaryNutModel( 2,-1,-1, 0, 0, 0, 3, -7, 0, 0, 0, 0, 0, 26, -9, 0, 0),
12129 new PlanetaryNutModel( 1, 0,-2, 0, 0, 19,-21, 3, 0, 0, 0, 0, 0, 103, -60, 0, 0),
12130 new PlanetaryNutModel( 0, 1,-1, 1, 0, 2, -4, 0,-3, 0, 0, 0, 0, 0, -13, -7, 0),
12131 new PlanetaryNutModel( 1, 0,-1, 1, 0, 0, -1, 0, 2, 0, 0, 0, 0, -26, -29, -16, 14),
12132 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0,-4,10, 0, 0, 0, 9, -27, -14, -5),
12133 new PlanetaryNutModel(-2, 0, 2, 1, 0, 0, 2, 0, 0,-5, 0, 0, 0, 12, 0, 0, -6),
12134 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -7, 4, 0, 0, 0, 0, 0, -7, 0, 0, 0),
12135 new PlanetaryNutModel( 0,-1, 1, 0, 0, 0, 1, 0, 1,-1, 0, 0, 0, 0, 24, 0, 0),
12136 new PlanetaryNutModel(-2, 0, 2, 1, 0, 0, 2, 0,-2, 0, 0, 0, 0, 284, 0, 0,-151),
12137
12138 /* 31-40 */
12139 new PlanetaryNutModel(-1, 0, 0, 0, 0, 18,-16, 0, 0, 0, 0, 0, 0, 226, 101, 0, 0),
12140 new PlanetaryNutModel(-2, 1, 1, 2, 0, 0, 1, 0,-2, 0, 0, 0, 0, 0, -8, -2, 0),
12141 new PlanetaryNutModel(-1, 1,-1, 1, 0, 18,-17, 0, 0, 0, 0, 0, 0, 0, -6, -3, 0),
12142 new PlanetaryNutModel(-1, 0, 1, 1, 0, 0, 2, -2, 0, 0, 0, 0, 0, 5, 0, 0, -3),
12143 new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 13, 0, 0, 0, 0, 0, 2, -41, 175, 76, 17),
12144 new PlanetaryNutModel( 0, 2,-2, 2, 0, -8, 11, 0, 0, 0, 0, 0, 0, 0, 15, 6, 0),
12145 new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 13, 0, 0, 0, 0, 0, 1, 425, 212, -133, 269),
12146 new PlanetaryNutModel( 0, 1,-1, 1, 0, -8, 12, 0, 0, 0, 0, 0, 0, 1200, 598, 319,-641),
12147 new PlanetaryNutModel( 0, 0, 0, 0, 0, 8,-13, 0, 0, 0, 0, 0, 0, 235, 334, 0, 0),
12148 new PlanetaryNutModel( 0, 1,-1, 1, 0, 8,-14, 0, 0, 0, 0, 0, 0, 11, -12, -7, -6),
12149
12150 /* 41-50 */
12151 new PlanetaryNutModel( 0, 0, 0, 0, 0, 8,-13, 0, 0, 0, 0, 0, 1, 5, -6, 3, 3),
12152 new PlanetaryNutModel(-2, 0, 2, 1, 0, 0, 2, 0,-4, 5, 0, 0, 0, -5, 0, 0, 3),
12153 new PlanetaryNutModel(-2, 0, 2, 2, 0, 3, -3, 0, 0, 0, 0, 0, 0, 6, 0, 0, -3),
12154 new PlanetaryNutModel(-2, 0, 2, 0, 0, 0, 2, 0,-3, 1, 0, 0, 0, 15, 0, 0, 0),
12155 new PlanetaryNutModel( 0, 0, 0, 1, 0, 3, -5, 0, 2, 0, 0, 0, 0, 13, 0, 0, -7),
12156 new PlanetaryNutModel(-2, 0, 2, 0, 0, 0, 2, 0,-4, 3, 0, 0, 0, -6, -9, 0, 0),
12157 new PlanetaryNutModel( 0,-1, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 266, -78, 0, 0),
12158 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, -1, 2, 0, 0, 0, 0, 0, -460,-435, -232, 246),
12159 new PlanetaryNutModel( 0, 1,-1, 2, 0, 0, -2, 2, 0, 0, 0, 0, 0, 0, 15, 7, 0),
12160 new PlanetaryNutModel(-1, 1, 0, 1, 0, 3, -5, 0, 0, 0, 0, 0, 0, -3, 0, 0, 2),
12161
12162 /* 51-60 */
12163 new PlanetaryNutModel(-1, 0, 1, 0, 0, 3, -4, 0, 0, 0, 0, 0, 0, 0, 131, 0, 0),
12164 new PlanetaryNutModel(-2, 0, 2, 0, 0, 0, 2, 0,-2,-2, 0, 0, 0, 4, 0, 0, 0),
12165 new PlanetaryNutModel(-2, 2, 0, 2, 0, 0, -5, 9, 0, 0, 0, 0, 0, 0, 3, 0, 0),
12166 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0, 0, 0,-1, 0, 0, 0, 4, 2, 0),
12167 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0),
12168 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0, 0, 0, 0, 2, 0, -17, -19, -10, 9),
12169 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, -9, -11, 6, -5),
12170 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, -6, 0, 0, 3),
12171 new PlanetaryNutModel(-1, 0, 1, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0, -16, 8, 0, 0),
12172 new PlanetaryNutModel( 0,-1, 1, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 3, 0, 0),
12173
12174 /* 61-70 */
12175 new PlanetaryNutModel( 0, 1,-1, 2, 0, 0, -1, 0, 0, 2, 0, 0, 0, 11, 24, 11, -5),
12176 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, -9, 17, 0, 0, 0, 0, 0, -3, -4, -2, 1),
12177 new PlanetaryNutModel( 0, 0, 0, 2, 0, -3, 5, 0, 0, 0, 0, 0, 0, 3, 0, 0, -1),
12178 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0,-1, 2, 0, 0, 0, 0, -8, -4, 0),
12179 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 1,-2, 0, 0, 0, 0, 3, 0, 0),
12180 new PlanetaryNutModel( 1, 0,-2, 0, 0, 17,-16, 0,-2, 0, 0, 0, 0, 0, 5, 0, 0),
12181 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0, 1,-3, 0, 0, 0, 0, 3, 2, 0),
12182 new PlanetaryNutModel(-2, 0, 2, 1, 0, 0, 5, -6, 0, 0, 0, 0, 0, -6, 4, 2, 3),
12183 new PlanetaryNutModel( 0,-2, 2, 0, 0, 0, 9,-13, 0, 0, 0, 0, 0, -3, -5, 0, 0),
12184 new PlanetaryNutModel( 0, 1,-1, 2, 0, 0, -1, 0, 0, 1, 0, 0, 0, -5, 0, 0, 2),
12185
12186 /* 71-80 */
12187 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 4, 24, 13, -2),
12188 new PlanetaryNutModel( 0,-1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, -42, 20, 0, 0),
12189 new PlanetaryNutModel( 0,-2, 2, 0, 0, 5, -6, 0, 0, 0, 0, 0, 0, -10, 233, 0, 0),
12190 new PlanetaryNutModel( 0,-1, 1, 1, 0, 5, -7, 0, 0, 0, 0, 0, 0, -3, 0, 0, 1),
12191 new PlanetaryNutModel(-2, 0, 2, 0, 0, 6, -8, 0, 0, 0, 0, 0, 0, 78, -18, 0, 0),
12192 new PlanetaryNutModel( 2, 1,-3, 1, 0, -6, 7, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0),
12193 new PlanetaryNutModel( 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, -3, -1, 0),
12194 new PlanetaryNutModel( 0,-1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, -4, -2, 1),
12195 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0, 0, 0, 2, 0, 0, 0, -8, -4, -1),
12196 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, -5, 3, 0),
12197
12198 /* 81-90 */
12199 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, -7, 0, 0, 3),
12200 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -8, 15, 0, 0, 0, 0, 2, -14, 8, 3, 6),
12201 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -8, 15, 0, 0, 0, 0, 1, 0, 8, -4, 0),
12202 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -9, 15, 0, 0, 0, 0, 0, 0, 19, 10, 0),
12203 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 8,-15, 0, 0, 0, 0, 0, 45, -22, 0, 0),
12204 new PlanetaryNutModel( 1,-1,-1, 0, 0, 0, 8,-15, 0, 0, 0, 0, 0, -3, 0, 0, 0),
12205 new PlanetaryNutModel( 2, 0,-2, 0, 0, 2, -5, 0, 0, 0, 0, 0, 0, 0, -3, 0, 0),
12206 new PlanetaryNutModel(-2, 0, 2, 0, 0, 0, 2, 0,-5, 5, 0, 0, 0, 0, 3, 0, 0),
12207 new PlanetaryNutModel( 2, 0,-2, 1, 0, 0, -6, 8, 0, 0, 0, 0, 0, 3, 5, 3, -2),
12208 new PlanetaryNutModel( 2, 0,-2, 1, 0, 0, -2, 0, 3, 0, 0, 0, 0, 89, -16, -9, -48),
12209
12210 /* 91-100 */
12211 new PlanetaryNutModel(-2, 1, 1, 0, 0, 0, 1, 0,-3, 0, 0, 0, 0, 0, 3, 0, 0),
12212 new PlanetaryNutModel(-2, 1, 1, 1, 0, 0, 1, 0,-3, 0, 0, 0, 0, -3, 7, 4, 2),
12213 new PlanetaryNutModel(-2, 0, 2, 0, 0, 0, 2, 0,-3, 0, 0, 0, 0, -349, -62, 0, 0),
12214 new PlanetaryNutModel(-2, 0, 2, 0, 0, 0, 6, -8, 0, 0, 0, 0, 0, -15, 22, 0, 0),
12215 new PlanetaryNutModel(-2, 0, 2, 0, 0, 0, 2, 0,-1,-5, 0, 0, 0, -3, 0, 0, 0),
12216 new PlanetaryNutModel(-1, 0, 1, 0, 0, 0, 1, 0,-1, 0, 0, 0, 0, -53, 0, 0, 0),
12217 new PlanetaryNutModel(-1, 1, 1, 1, 0,-20, 20, 0, 0, 0, 0, 0, 0, 5, 0, 0, -3),
12218 new PlanetaryNutModel( 1, 0,-2, 0, 0, 20,-21, 0, 0, 0, 0, 0, 0, 0, -8, 0, 0),
12219 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, 8,-15, 0, 0, 0, 0, 0, 15, -7, -4, -8),
12220 new PlanetaryNutModel( 0, 2,-2, 1, 0, 0,-10, 15, 0, 0, 0, 0, 0, -3, 0, 0, 1),
12221
12222 /* 101-110 */
12223 new PlanetaryNutModel( 0,-1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, -21, -78, 0, 0),
12224 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 20, -70, -37, -11),
12225 new PlanetaryNutModel( 0, 1,-1, 2, 0, 0, -1, 0, 1, 0, 0, 0, 0, 0, 6, 3, 0),
12226 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0,-2, 4, 0, 0, 0, 5, 3, 2, -2),
12227 new PlanetaryNutModel( 2, 0,-2, 1, 0, -6, 8, 0, 0, 0, 0, 0, 0, -17, -4, -2, 9),
12228 new PlanetaryNutModel( 0,-2, 2, 1, 0, 5, -6, 0, 0, 0, 0, 0, 0, 0, 6, 3, 0),
12229 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 0,-1, 0, 0, 1, 32, 15, -8, 17),
12230 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0, 0,-1, 0, 0, 0, 174, 84, 45, -93),
12231 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 11, 56, 0, 0),
12232 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0, 0, 1, 0, 0, 0, -66, -12, -6, 35),
12233
12234 /* 111-120 */
12235 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 47, 8, 4, -25),
12236 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 8, 4, 0),
12237 new PlanetaryNutModel( 0, 2,-2, 1, 0, 0, -9, 13, 0, 0, 0, 0, 0, 10, -22, -12, -5),
12238 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, 7,-13, 0, 0, 0, 0, 0, -3, 0, 0, 2),
12239 new PlanetaryNutModel(-2, 0, 2, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0, -24, 12, 0, 0),
12240 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 9,-17, 0, 0, 0, 0, 0, 5, -6, 0, 0),
12241 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -9, 17, 0, 0, 0, 0, 2, 3, 0, 0, -2),
12242 new PlanetaryNutModel( 1, 0,-1, 1, 0, 0, -3, 4, 0, 0, 0, 0, 0, 4, 3, 1, -2),
12243 new PlanetaryNutModel( 1, 0,-1, 1, 0, -3, 4, 0, 0, 0, 0, 0, 0, 0, 29, 15, 0),
12244 new PlanetaryNutModel( 0, 0, 0, 2, 0, 0, -1, 2, 0, 0, 0, 0, 0, -5, -4, -2, 2),
12245
12246 /* 121-130 */
12247 new PlanetaryNutModel( 0,-1, 1, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 8, -3, -1, -5),
12248 new PlanetaryNutModel( 0,-2, 2, 0, 1, 0, -2, 0, 0, 0, 0, 0, 0, 0, -3, 0, 0),
12249 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -5, 0, 2, 0, 0, 0, 0, 10, 0, 0, 0),
12250 new PlanetaryNutModel(-2, 0, 2, 1, 0, 0, 2, 0,-3, 1, 0, 0, 0, 3, 0, 0, -2),
12251 new PlanetaryNutModel(-2, 0, 2, 1, 0, 3, -3, 0, 0, 0, 0, 0, 0, -5, 0, 0, 3),
12252 new PlanetaryNutModel( 0, 0, 0, 1, 0, 8,-13, 0, 0, 0, 0, 0, 0, 46, 66, 35, -25),
12253 new PlanetaryNutModel( 0,-1, 1, 0, 0, 8,-12, 0, 0, 0, 0, 0, 0, -14, 7, 0, 0),
12254 new PlanetaryNutModel( 0, 2,-2, 1, 0, -8, 11, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0),
12255 new PlanetaryNutModel(-1, 0, 1, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, -5, 0, 0, 0),
12256 new PlanetaryNutModel(-1, 0, 0, 1, 0, 18,-16, 0, 0, 0, 0, 0, 0, -68, -34, -18, 36),
12257
12258 /* 131-140 */
12259 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0,-1, 1, 0, 0, 0, 0, 14, 7, 0),
12260 new PlanetaryNutModel( 0, 0, 0, 1, 0, 3, -7, 4, 0, 0, 0, 0, 0, 10, -6, -3, -5),
12261 new PlanetaryNutModel(-2, 1, 1, 1, 0, 0, -3, 7, 0, 0, 0, 0, 0, -5, -4, -2, 3),
12262 new PlanetaryNutModel( 0, 1,-1, 2, 0, 0, -1, 0,-2, 5, 0, 0, 0, -3, 5, 2, 1),
12263 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, 0, 0,-2, 5, 0, 0, 0, 76, 17, 9, -41),
12264 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, -4, 8,-3, 0, 0, 0, 0, 84, 298, 159, -45),
12265 new PlanetaryNutModel( 1, 0, 0, 1, 0,-10, 3, 0, 0, 0, 0, 0, 0, 3, 0, 0, -1),
12266 new PlanetaryNutModel( 0, 2,-2, 1, 0, 0, -2, 0, 0, 0, 0, 0, 0, -3, 0, 0, 2),
12267 new PlanetaryNutModel(-1, 0, 0, 1, 0, 10, -3, 0, 0, 0, 0, 0, 0, -3, 0, 0, 1),
12268 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, 4, -8, 3, 0, 0, 0, 0, -82, 292, 156, 44),
12269
12270 /* 141-150 */
12271 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, 0, 0, 2,-5, 0, 0, 0, -73, 17, 9, 39),
12272 new PlanetaryNutModel( 0,-1, 1, 0, 0, 0, 1, 0, 2,-5, 0, 0, 0, -9, -16, 0, 0),
12273 new PlanetaryNutModel( 2,-1,-1, 1, 0, 0, 3, -7, 0, 0, 0, 0, 0, 3, 0, -1, -2),
12274 new PlanetaryNutModel(-2, 0, 2, 0, 0, 0, 2, 0, 0,-5, 0, 0, 0, -3, 0, 0, 0),
12275 new PlanetaryNutModel( 0, 0, 0, 1, 0, -3, 7, -4, 0, 0, 0, 0, 0, -9, -5, -3, 5),
12276 new PlanetaryNutModel(-2, 0, 2, 0, 0, 0, 2, 0,-2, 0, 0, 0, 0, -439, 0, 0, 0),
12277 new PlanetaryNutModel( 1, 0, 0, 1, 0,-18, 16, 0, 0, 0, 0, 0, 0, 57, -28, -15, -30),
12278 new PlanetaryNutModel(-2, 1, 1, 1, 0, 0, 1, 0,-2, 0, 0, 0, 0, 0, -6, -3, 0),
12279 new PlanetaryNutModel( 0, 1,-1, 2, 0, -8, 12, 0, 0, 0, 0, 0, 0, -4, 0, 0, 2),
12280 new PlanetaryNutModel( 0, 0, 0, 1, 0, -8, 13, 0, 0, 0, 0, 0, 0, -40, 57, 30, 21),
12281
12282 /* 151-160 */
12283 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 1, 23, 7, 3, -13),
12284 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, 0, -2, 0, 0, 0, 0, 0, 273, 80, 43,-146),
12285 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0, -449, 430, 0, 0),
12286 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -2, 2, 0, 0, 0, 0, 0, -8, -47, -25, 4),
12287 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -1, 2, 0, 0, 0, 0, 1, 6, 47, 25, -3),
12288 new PlanetaryNutModel(-1, 0, 1, 1, 0, 3, -4, 0, 0, 0, 0, 0, 0, 0, 23, 13, 0),
12289 new PlanetaryNutModel(-1, 0, 1, 1, 0, 0, 3, -4, 0, 0, 0, 0, 0, -3, 0, 0, 2),
12290 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0, 0,-2, 0, 0, 0, 3, -4, -2, -2),
12291 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0, 0, 2, 0, 0, 0, -48,-110, -59, 26),
12292 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 51, 114, 61, -27),
12293
12294 /* 161-170 */
12295 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, -133, 0, 0, 57),
12296 new PlanetaryNutModel( 0, 1,-1, 0, 0, 3, -6, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0),
12297 new PlanetaryNutModel( 0, 0, 0, 1, 0, -3, 5, 0, 0, 0, 0, 0, 0, -21, -6, -3, 11),
12298 new PlanetaryNutModel( 0, 1,-1, 2, 0, -3, 4, 0, 0, 0, 0, 0, 0, 0, -3, -1, 0),
12299 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, -2, 4, 0, 0, 0, 0, 0, -11, -21, -11, 6),
12300 new PlanetaryNutModel( 0, 2,-2, 1, 0, -5, 6, 0, 0, 0, 0, 0, 0, -18,-436, -233, 9),
12301 new PlanetaryNutModel( 0,-1, 1, 0, 0, 5, -7, 0, 0, 0, 0, 0, 0, 35, -7, 0, 0),
12302 new PlanetaryNutModel( 0, 0, 0, 1, 0, 5, -8, 0, 0, 0, 0, 0, 0, 0, 5, 3, 0),
12303 new PlanetaryNutModel(-2, 0, 2, 1, 0, 6, -8, 0, 0, 0, 0, 0, 0, 11, -3, -1, -6),
12304 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, -8, 15, 0, 0, 0, 0, 0, -5, -3, -1, 3),
12305
12306 /* 171-180 */
12307 new PlanetaryNutModel(-2, 0, 2, 1, 0, 0, 2, 0,-3, 0, 0, 0, 0, -53, -9, -5, 28),
12308 new PlanetaryNutModel(-2, 0, 2, 1, 0, 0, 6, -8, 0, 0, 0, 0, 0, 0, 3, 2, 1),
12309 new PlanetaryNutModel( 1, 0,-1, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0, 4, 0, 0, -2),
12310 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 3,-5, 0, 0, 0, 0, -4, 0, 0),
12311 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0,-1, 0, 0, 0, 0, -50, 194, 103, 27),
12312 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0,-1, 0, 0, 0, 1, -13, 52, 28, 7),
12313 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, -91, 248, 0, 0),
12314 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 6, 49, 26, -3),
12315 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0, -6, -47, -25, 3),
12316 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5, 3, 0),
12317
12318 /* 181-190 */
12319 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 52, 23, 10, -23),
12320 new PlanetaryNutModel( 0, 1,-1, 2, 0, 0, -1, 0, 0,-1, 0, 0, 0, -3, 0, 0, 1),
12321 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, 0, 0, 0,-1, 0, 0, 0, 0, 5, 3, 0),
12322 new PlanetaryNutModel( 0,-1, 1, 0, 0, 0, 1, 0, 0,-1, 0, 0, 0, -4, 0, 0, 0),
12323 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -7, 13, 0, 0, 0, 0, 2, -4, 8, 3, 2),
12324 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 7,-13, 0, 0, 0, 0, 0, 10, 0, 0, 0),
12325 new PlanetaryNutModel( 2, 0,-2, 1, 0, 0, -5, 6, 0, 0, 0, 0, 0, 3, 0, 0, -2),
12326 new PlanetaryNutModel( 0, 2,-2, 1, 0, 0, -8, 11, 0, 0, 0, 0, 0, 0, 8, 4, 0),
12327 new PlanetaryNutModel( 0, 2,-2, 1,-1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 8, 4, 1),
12328 new PlanetaryNutModel(-2, 0, 2, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, -4, 0, 0, 0),
12329
12330 /* 191-200 */
12331 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 2,-2, 0, 0, 0, -4, 0, 0, 0),
12332 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0, 0, 3, 0, 0, 0, -8, 4, 2, 4),
12333 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 1, 8, -4, -2, -4),
12334 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 2, 0, 15, 7, 0),
12335 new PlanetaryNutModel(-2, 0, 2, 0, 0, 3, -3, 0, 0, 0, 0, 0, 0, -138, 0, 0, 0),
12336 new PlanetaryNutModel( 0, 0, 0, 2, 0, 0, -4, 8,-3, 0, 0, 0, 0, 0, -7, -3, 0),
12337 new PlanetaryNutModel( 0, 0, 0, 2, 0, 0, 4, -8, 3, 0, 0, 0, 0, 0, -7, -3, 0),
12338 new PlanetaryNutModel( 2, 0,-2, 1, 0, 0, -2, 0, 2, 0, 0, 0, 0, 54, 0, 0, -29),
12339 new PlanetaryNutModel( 0, 1,-1, 2, 0, 0, -1, 0, 2, 0, 0, 0, 0, 0, 10, 4, 0),
12340 new PlanetaryNutModel( 0, 1,-1, 2, 0, 0, 0, -2, 0, 0, 0, 0, 0, -7, 0, 0, 3),
12341
12342 /* 201-210 */
12343 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, 1, -2, 0, 0, 0, 0, 0, -37, 35, 19, 20),
12344 new PlanetaryNutModel( 0,-1, 1, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, 4, 0, 0),
12345 new PlanetaryNutModel( 0,-1, 1, 0, 0, 0, 1, 0, 0,-2, 0, 0, 0, -4, 9, 0, 0),
12346 new PlanetaryNutModel( 0, 2,-2, 1, 0, 0, -2, 0, 0, 2, 0, 0, 0, 8, 0, 0, -4),
12347 new PlanetaryNutModel( 0, 1,-1, 1, 0, 3, -6, 0, 0, 0, 0, 0, 0, -9, -14, -8, 5),
12348 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0, 1, -3, -9, -5, 3),
12349 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0, 0, -145, 47, 0, 0),
12350 new PlanetaryNutModel( 0, 1,-1, 1, 0, -3, 4, 0, 0, 0, 0, 0, 0, -10, 40, 21, 5),
12351 new PlanetaryNutModel( 0, 0, 0, 0, 0, -3, 5, 0, 0, 0, 0, 0, 1, 11, -49, -26, -7),
12352 new PlanetaryNutModel( 0, 0, 0, 0, 0, -3, 5, 0, 0, 0, 0, 0, 2,-2150, 0, 0, 932),
12353
12354 /* 211-220 */
12355 new PlanetaryNutModel( 0, 2,-2, 2, 0, -3, 3, 0, 0, 0, 0, 0, 0, -12, 0, 0, 5),
12356 new PlanetaryNutModel( 0, 0, 0, 0, 0, -3, 5, 0, 0, 0, 0, 0, 2, 85, 0, 0, -37),
12357 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 1, 4, 0, 0, -2),
12358 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, 1, -4, 0, 0, 0, 0, 0, 3, 0, 0, -2),
12359 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 0, -86, 153, 0, 0),
12360 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -2, 4, 0, 0, 0, 0, 1, -6, 9, 5, 3),
12361 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -3, 4, 0, 0, 0, 0, 0, 9, -13, -7, -5),
12362 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -2, 4, 0, 0, 0, 0, 1, -8, 12, 6, 4),
12363 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -2, 4, 0, 0, 0, 0, 2, -51, 0, 0, 22),
12364 new PlanetaryNutModel( 0, 0, 0, 0, 0, -5, 8, 0, 0, 0, 0, 0, 2, -11,-268, -116, 5),
12365
12366 /* 221-230 */
12367 new PlanetaryNutModel( 0, 2,-2, 2, 0, -5, 6, 0, 0, 0, 0, 0, 0, 0, 12, 5, 0),
12368 new PlanetaryNutModel( 0, 0, 0, 0, 0, -5, 8, 0, 0, 0, 0, 0, 2, 0, 7, 3, 0),
12369 new PlanetaryNutModel( 0, 0, 0, 0, 0, -5, 8, 0, 0, 0, 0, 0, 1, 31, 6, 3, -17),
12370 new PlanetaryNutModel( 0, 1,-1, 1, 0, -5, 7, 0, 0, 0, 0, 0, 0, 140, 27, 14, -75),
12371 new PlanetaryNutModel( 0, 0, 0, 0, 0, -5, 8, 0, 0, 0, 0, 0, 1, 57, 11, 6, -30),
12372 new PlanetaryNutModel( 0, 0, 0, 0, 0, 5, -8, 0, 0, 0, 0, 0, 0, -14, -39, 0, 0),
12373 new PlanetaryNutModel( 0, 1,-1, 2, 0, 0, -1, 0,-1, 0, 0, 0, 0, 0, -6, -2, 0),
12374 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, 0, 0,-1, 0, 0, 0, 0, 4, 15, 8, -2),
12375 new PlanetaryNutModel( 0,-1, 1, 0, 0, 0, 1, 0,-1, 0, 0, 0, 0, 0, 4, 0, 0),
12376 new PlanetaryNutModel( 0, 2,-2, 1, 0, 0, -2, 0, 1, 0, 0, 0, 0, -3, 0, 0, 1),
12377
12378 /* 231-240 */
12379 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -6, 11, 0, 0, 0, 0, 2, 0, 11, 5, 0),
12380 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 6,-11, 0, 0, 0, 0, 0, 9, 6, 0, 0),
12381 new PlanetaryNutModel( 0, 0, 0, 0,-1, 0, 4, 0, 0, 0, 0, 0, 2, -4, 10, 4, 2),
12382 new PlanetaryNutModel( 0, 0, 0, 0, 1, 0, -4, 0, 0, 0, 0, 0, 0, 5, 3, 0, 0),
12383 new PlanetaryNutModel( 2, 0,-2, 1, 0, -3, 3, 0, 0, 0, 0, 0, 0, 16, 0, 0, -9),
12384 new PlanetaryNutModel(-2, 0, 2, 0, 0, 0, 2, 0, 0,-2, 0, 0, 0, -3, 0, 0, 0),
12385 new PlanetaryNutModel( 0, 2,-2, 1, 0, 0, -7, 9, 0, 0, 0, 0, 0, 0, 3, 2, -1),
12386 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 4,-5, 0, 0, 2, 7, 0, 0, -3),
12387 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, -25, 22, 0, 0),
12388 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 42, 223, 119, -22),
12389
12390 /* 241-250 */
12391 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0, 2, 0, 0, 0, 0, -27,-143, -77, 14),
12392 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 9, 49, 26, -5),
12393 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2,-1166, 0, 0, 505),
12394 new PlanetaryNutModel( 0, 2,-2, 2, 0, 0, -2, 0, 2, 0, 0, 0, 0, -5, 0, 0, 2),
12395 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 2, -6, 0, 0, 3),
12396 new PlanetaryNutModel( 0, 0, 0, 1, 0, 3, -5, 0, 0, 0, 0, 0, 0, -8, 0, 1, 4),
12397 new PlanetaryNutModel( 0,-1, 1, 0, 0, 3, -4, 0, 0, 0, 0, 0, 0, 0, -4, 0, 0),
12398 new PlanetaryNutModel( 0, 2,-2, 1, 0, -3, 3, 0, 0, 0, 0, 0, 0, 117, 0, 0, -63),
12399 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, 2, -4, 0, 0, 0, 0, 0, -4, 8, 4, 2),
12400 new PlanetaryNutModel( 0, 2,-2, 1, 0, 0, -4, 4, 0, 0, 0, 0, 0, 3, 0, 0, -2),
12401
12402 /* 251-260 */
12403 new PlanetaryNutModel( 0, 1,-1, 2, 0, -5, 7, 0, 0, 0, 0, 0, 0, -5, 0, 0, 2),
12404 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, -6, 0, 0, 0, 0, 0, 0, 31, 0, 0),
12405 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -3, 6, 0, 0, 0, 0, 1, -5, 0, 1, 3),
12406 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -4, 6, 0, 0, 0, 0, 0, 4, 0, 0, -2),
12407 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -3, 6, 0, 0, 0, 0, 1, -4, 0, 0, 2),
12408 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -3, 6, 0, 0, 0, 0, 2, -24, -13, -6, 10),
12409 new PlanetaryNutModel( 0,-1, 1, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0),
12410 new PlanetaryNutModel( 0, 0, 0, 1, 0, 2, -3, 0, 0, 0, 0, 0, 0, 0, -32, -17, 0),
12411 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -5, 9, 0, 0, 0, 0, 2, 8, 12, 5, -3),
12412 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -5, 9, 0, 0, 0, 0, 1, 3, 0, 0, -1),
12413
12414 /* 261-270 */
12415 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 5, -9, 0, 0, 0, 0, 0, 7, 13, 0, 0),
12416 new PlanetaryNutModel( 0,-1, 1, 0, 0, 0, 1, 0,-2, 0, 0, 0, 0, -3, 16, 0, 0),
12417 new PlanetaryNutModel( 0, 2,-2, 1, 0, 0, -2, 0, 2, 0, 0, 0, 0, 50, 0, 0, -27),
12418 new PlanetaryNutModel(-2, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -5, -3, 0),
12419 new PlanetaryNutModel( 0,-2, 2, 0, 0, 3, -3, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0),
12420 new PlanetaryNutModel( 0, 0, 0, 0, 0, -6, 10, 0, 0, 0, 0, 0, 1, 0, 5, 3, 1),
12421 new PlanetaryNutModel( 0, 0, 0, 0, 0, -6, 10, 0, 0, 0, 0, 0, 2, 24, 5, 2, -11),
12422 new PlanetaryNutModel( 0, 0, 0, 0, 0, -2, 3, 0, 0, 0, 0, 0, 2, 5, -11, -5, -2),
12423 new PlanetaryNutModel( 0, 0, 0, 0, 0, -2, 3, 0, 0, 0, 0, 0, 1, 30, -3, -2, -16),
12424 new PlanetaryNutModel( 0, 1,-1, 1, 0, -2, 2, 0, 0, 0, 0, 0, 0, 18, 0, 0, -9),
12425
12426 /* 271-280 */
12427 new PlanetaryNutModel( 0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0, 0, 8, 614, 0, 0),
12428 new PlanetaryNutModel( 0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0, 1, 3, -3, -1, -2),
12429 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 1, 6, 17, 9, -3),
12430 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, -1, 0, 3, 0, 0, 0, 0, -3, -9, -5, 2),
12431 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 1, 0, 6, 3, -1),
12432 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 2, -127, 21, 9, 55),
12433 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, -8, 0, 0, 0, 0, 0, 3, 5, 0, 0),
12434 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -4, 8, 0, 0, 0, 0, 2, -6, -10, -4, 3),
12435 new PlanetaryNutModel( 0,-2, 2, 0, 0, 0, 2, 0,-2, 0, 0, 0, 0, 5, 0, 0, 0),
12436 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -4, 7, 0, 0, 0, 0, 2, 16, 9, 4, -7),
12437
12438 /* 281-290 */
12439 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -4, 7, 0, 0, 0, 0, 1, 3, 0, 0, -2),
12440 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, -7, 0, 0, 0, 0, 0, 0, 22, 0, 0),
12441 new PlanetaryNutModel( 0, 0, 0, 1, 0, -2, 3, 0, 0, 0, 0, 0, 0, 0, 19, 10, 0),
12442 new PlanetaryNutModel( 0, 2,-2, 1, 0, 0, -2, 0, 3, 0, 0, 0, 0, 7, 0, 0, -4),
12443 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -5, 10, 0, 0, 0, 0, 2, 0, -5, -2, 0),
12444 new PlanetaryNutModel( 0, 0, 0, 1, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0),
12445 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 2, -9, 3, 1, 4),
12446 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -3, 5, 0, 0, 0, 0, 2, 17, 0, 0, -7),
12447 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -3, 5, 0, 0, 0, 0, 1, 0, -3, -2, -1),
12448 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0, -20, 34, 0, 0),
12449
12450 /* 291-300 */
12451 new PlanetaryNutModel( 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0, 1, -10, 0, 1, 5),
12452 new PlanetaryNutModel( 0, 1,-1, 1, 0, 1, -3, 0, 0, 0, 0, 0, 0, -4, 0, 0, 2),
12453 new PlanetaryNutModel( 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0, 0, 22, -87, 0, 0),
12454 new PlanetaryNutModel( 0, 0, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 1, -4, 0, 0, 2),
12455 new PlanetaryNutModel( 0, 0, 0, 0, 0, -1, 2, 0, 0, 0, 0, 0, 2, -3, -6, -2, 1),
12456 new PlanetaryNutModel( 0, 0, 0, 0, 0, -7, 11, 0, 0, 0, 0, 0, 2, -16, -3, -1, 7),
12457 new PlanetaryNutModel( 0, 0, 0, 0, 0, -7, 11, 0, 0, 0, 0, 0, 1, 0, -3, -2, 0),
12458 new PlanetaryNutModel( 0,-2, 2, 0, 0, 4, -4, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0),
12459 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0, -68, 39, 0, 0),
12460 new PlanetaryNutModel( 0, 2,-2, 1, 0, -4, 4, 0, 0, 0, 0, 0, 0, 27, 0, 0, -14),
12461
12462 /* 301-310 */
12463 new PlanetaryNutModel( 0,-1, 1, 0, 0, 4, -5, 0, 0, 0, 0, 0, 0, 0, -4, 0, 0),
12464 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, -25, 0, 0, 0),
12465 new PlanetaryNutModel( 0, 0, 0, 0, 0, -4, 7, 0, 0, 0, 0, 0, 1, -12, -3, -2, 6),
12466 new PlanetaryNutModel( 0, 1,-1, 1, 0, -4, 6, 0, 0, 0, 0, 0, 0, 3, 0, 0, -1),
12467 new PlanetaryNutModel( 0, 0, 0, 0, 0, -4, 7, 0, 0, 0, 0, 0, 2, 3, 66, 29, -1),
12468 new PlanetaryNutModel( 0, 0, 0, 0, 0, -4, 6, 0, 0, 0, 0, 0, 2, 490, 0, 0,-213),
12469 new PlanetaryNutModel( 0, 0, 0, 0, 0, -4, 6, 0, 0, 0, 0, 0, 1, -22, 93, 49, 12),
12470 new PlanetaryNutModel( 0, 1,-1, 1, 0, -4, 5, 0, 0, 0, 0, 0, 0, -7, 28, 15, 4),
12471 new PlanetaryNutModel( 0, 0, 0, 0, 0, -4, 6, 0, 0, 0, 0, 0, 1, -3, 13, 7, 2),
12472 new PlanetaryNutModel( 0, 0, 0, 0, 0, 4, -6, 0, 0, 0, 0, 0, 0, -46, 14, 0, 0),
12473
12474 /* 311-320 */
12475 new PlanetaryNutModel(-2, 0, 2, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, -5, 0, 0, 0),
12476 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 1, 0, 0),
12477 new PlanetaryNutModel( 0,-1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, -3, 0, 0),
12478 new PlanetaryNutModel( 0, 0, 0, 1, 0, 1, -1, 0, 0, 0, 0, 0, 0, -28, 0, 0, 15),
12479 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -1, 0, 5, 0, 0, 0, 2, 5, 0, 0, -2),
12480 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, -3, 0, 0, 0, 0, 0, 0, 3, 0, 0),
12481 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -1, 3, 0, 0, 0, 0, 2, -11, 0, 0, 5),
12482 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -7, 12, 0, 0, 0, 0, 2, 0, 3, 1, 0),
12483 new PlanetaryNutModel( 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 2, -3, 0, 0, 1),
12484 new PlanetaryNutModel( 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 1, 25, 106, 57, -13),
12485
12486 /* 321-330 */
12487 new PlanetaryNutModel( 0, 1,-1, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 5, 21, 11, -3),
12488 new PlanetaryNutModel( 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, 1485, 0, 0, 0),
12489 new PlanetaryNutModel( 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 1, -7, -32, -17, 4),
12490 new PlanetaryNutModel( 0, 1,-1, 1, 0, 1, -2, 0, 0, 0, 0, 0, 0, 0, 5, 3, 0),
12491 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -2, 5, 0, 0, 0, 0, 2, -6, -3, -2, 3),
12492 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -1, 0, 4, 0, 0, 0, 2, 30, -6, -2, -13),
12493 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0,-4, 0, 0, 0, 0, -4, 4, 0, 0),
12494 new PlanetaryNutModel( 0, 0, 0, 1, 0, -1, 1, 0, 0, 0, 0, 0, 0, -19, 0, 0, 10),
12495 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -6, 10, 0, 0, 0, 0, 2, 0, 4, 2, -1),
12496 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -6, 10, 0, 0, 0, 0, 0, 0, 3, 0, 0),
12497
12498 /* 331-340 */
12499 new PlanetaryNutModel( 0, 2,-2, 1, 0, 0, -3, 0, 3, 0, 0, 0, 0, 4, 0, 0, -2),
12500 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -3, 7, 0, 0, 0, 0, 2, 0, -3, -1, 0),
12501 new PlanetaryNutModel(-2, 0, 2, 0, 0, 4, -4, 0, 0, 0, 0, 0, 0, -3, 0, 0, 0),
12502 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -5, 8, 0, 0, 0, 0, 2, 5, 3, 1, -2),
12503 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 5, -8, 0, 0, 0, 0, 0, 0, 11, 0, 0),
12504 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -1, 0, 3, 0, 0, 0, 2, 118, 0, 0, -52),
12505 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -1, 0, 3, 0, 0, 0, 1, 0, -5, -3, 0),
12506 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0,-3, 0, 0, 0, 0, -28, 36, 0, 0),
12507 new PlanetaryNutModel( 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 0, 0, 5, -5, 0, 0),
12508 new PlanetaryNutModel( 0, 0, 0, 0, 0, -2, 4, 0, 0, 0, 0, 0, 1, 14, -59, -31, -8),
12509
12510 /* 341-350 */
12511 new PlanetaryNutModel( 0, 1,-1, 1, 0, -2, 3, 0, 0, 0, 0, 0, 0, 0, 9, 5, 1),
12512 new PlanetaryNutModel( 0, 0, 0, 0, 0, -2, 4, 0, 0, 0, 0, 0, 2, -458, 0, 0, 198),
12513 new PlanetaryNutModel( 0, 0, 0, 0, 0, -6, 9, 0, 0, 0, 0, 0, 2, 0, -45, -20, 0),
12514 new PlanetaryNutModel( 0, 0, 0, 0, 0, -6, 9, 0, 0, 0, 0, 0, 1, 9, 0, 0, -5),
12515 new PlanetaryNutModel( 0, 0, 0, 0, 0, 6, -9, 0, 0, 0, 0, 0, 0, 0, -3, 0, 0),
12516 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, 1, 0,-2, 0, 0, 0, 0, 0, -4, -2, -1),
12517 new PlanetaryNutModel( 0, 2,-2, 1, 0, -2, 2, 0, 0, 0, 0, 0, 0, 11, 0, 0, -6),
12518 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -4, 6, 0, 0, 0, 0, 2, 6, 0, 0, -2),
12519 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, -6, 0, 0, 0, 0, 0, -16, 23, 0, 0),
12520 new PlanetaryNutModel( 0, 0, 0, 1, 0, 3, -4, 0, 0, 0, 0, 0, 0, 0, -4, -2, 0),
12521
12522 /* 351-360 */
12523 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -1, 0, 2, 0, 0, 0, 2, -5, 0, 0, 2),
12524 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0,-2, 0, 0, 0, 0, -166, 269, 0, 0),
12525 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, 1, 0,-1, 0, 0, 0, 0, 15, 0, 0, -8),
12526 new PlanetaryNutModel( 0, 0, 0, 0, 0, -5, 9, 0, 0, 0, 0, 0, 2, 10, 0, 0, -4),
12527 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0, -78, 45, 0, 0),
12528 new PlanetaryNutModel( 0, 0, 0, 0, 0, -3, 4, 0, 0, 0, 0, 0, 2, 0, -5, -2, 0),
12529 new PlanetaryNutModel( 0, 0, 0, 0, 0, -3, 4, 0, 0, 0, 0, 0, 1, 7, 0, 0, -4),
12530 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0, 0, -5, 328, 0, 0),
12531 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0, 1, 3, 0, 0, -2),
12532 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, 2, -2, 0, 0, 0, 0, 0, 5, 0, 0, -2),
12533
12534 /* 361-370 */
12535 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, -1, 0, 2, 0, 0, 0, 0, 0, 3, 1, 0),
12536 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0, 0,-3, 0, 0, 0, -3, 0, 0, 0),
12537 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0, 1,-5, 0, 0, 0, -3, 0, 0, 0),
12538 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -1, 0, 1, 0, 0, 0, 1, 0, -4, -2, 0),
12539 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0,-1, 0, 0, 0, 0,-1223, -26, 0, 0),
12540 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0,-1, 0, 0, 0, 1, 0, 7, 3, 0),
12541 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0,-3, 5, 0, 0, 0, 3, 0, 0, 0),
12542 new PlanetaryNutModel( 0, 0, 0, 1, 0, -3, 4, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0),
12543 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0, 0,-2, 0, 0, 0, -6, 20, 0, 0),
12544 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, -368, 0, 0, 0),
12545
12546 /* 371-380 */
12547 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0, 0,-1, 0, 0, 0, -75, 0, 0, 0),
12548 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0, 11, 0, 0, -6),
12549 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, -2, 2, 0, 0, 0, 0, 0, 3, 0, 0, -2),
12550 new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 14, 0, 0, 0, 0, 0, 2, -3, 0, 0, 1),
12551 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0, 2,-5, 0, 0, 0, -13, -30, 0, 0),
12552 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 5, -8, 3, 0, 0, 0, 0, 21, 3, 0, 0),
12553 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 5, -8, 3, 0, 0, 0, 2, -3, 0, 0, 1),
12554 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 1, -4, 0, 0, 2),
12555 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 8, -27, 0, 0),
12556 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, -8, 3, 0, 0, 0, 0, -19, -11, 0, 0),
12557
12558 /* 381-390 */
12559 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -3, 8,-3, 0, 0, 0, 2, -4, 0, 0, 2),
12560 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0,-2, 5, 0, 0, 2, 0, 5, 2, 0),
12561 new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 12, 0, 0, 0, 0, 0, 2, -6, 0, 0, 2),
12562 new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 12, 0, 0, 0, 0, 0, 0, -8, 0, 0, 0),
12563 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0, 1,-2, 0, 0, 0, -1, 0, 0, 0),
12564 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 2, -14, 0, 0, 6),
12565 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 6, 0, 0, 0),
12566 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, -74, 0, 0, 32),
12567 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 2, 0, -3, -1, 0),
12568 new PlanetaryNutModel( 0, 2,-2, 1, 0, -5, 5, 0, 0, 0, 0, 0, 0, 4, 0, 0, -2),
12569
12570 /* 391-400 */
12571 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 8, 11, 0, 0),
12572 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 3, 2, 0),
12573 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 2, -262, 0, 0, 114),
12574 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -6, 0, 0, 0, 0, 0, 0, 0, -4, 0, 0),
12575 new PlanetaryNutModel( 0, 0, 0, 0, 0, -3, 6, 0, 0, 0, 0, 0, 1, -7, 0, 0, 4),
12576 new PlanetaryNutModel( 0, 0, 0, 0, 0, -3, 6, 0, 0, 0, 0, 0, 2, 0, -27, -12, 0),
12577 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -1, 4, 0, 0, 0, 0, 2, -19, -8, -4, 8),
12578 new PlanetaryNutModel( 0, 0, 0, 0, 0, -5, 7, 0, 0, 0, 0, 0, 2, 202, 0, 0, -87),
12579 new PlanetaryNutModel( 0, 0, 0, 0, 0, -5, 7, 0, 0, 0, 0, 0, 1, -8, 35, 19, 5),
12580 new PlanetaryNutModel( 0, 1,-1, 1, 0, -5, 6, 0, 0, 0, 0, 0, 0, 0, 4, 2, 0),
12581
12582 /* 401-410 */
12583 new PlanetaryNutModel( 0, 0, 0, 0, 0, 5, -7, 0, 0, 0, 0, 0, 0, 16, -5, 0, 0),
12584 new PlanetaryNutModel( 0, 2,-2, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0, 5, 0, 0, -3),
12585 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0, 0, -3, 0, 0),
12586 new PlanetaryNutModel( 0, 0, 0, 0,-1, 0, 3, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0),
12587 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 2, -35, -48, -21, 15),
12588 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -2, 6, 0, 0, 0, 0, 2, -3, -5, -2, 1),
12589 new PlanetaryNutModel( 0, 0, 0, 1, 0, 2, -2, 0, 0, 0, 0, 0, 0, 6, 0, 0, -3),
12590 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -6, 9, 0, 0, 0, 0, 2, 3, 0, 0, -1),
12591 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 6, -9, 0, 0, 0, 0, 0, 0, -5, 0, 0),
12592 new PlanetaryNutModel( 0, 0, 0, 0, 0, -2, 2, 0, 0, 0, 0, 0, 1, 12, 55, 29, -6),
12593
12594 /* 411-420 */
12595 new PlanetaryNutModel( 0, 1,-1, 1, 0, -2, 1, 0, 0, 0, 0, 0, 0, 0, 5, 3, 0),
12596 new PlanetaryNutModel( 0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, -598, 0, 0, 0),
12597 new PlanetaryNutModel( 0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, 1, -3, -13, -7, 1),
12598 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 2, -5, -7, -3, 2),
12599 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -5, 7, 0, 0, 0, 0, 2, 3, 0, 0, -1),
12600 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 5, -7, 0, 0, 0, 0, 0, 5, -7, 0, 0),
12601 new PlanetaryNutModel( 0, 0, 0, 1, 0, -2, 2, 0, 0, 0, 0, 0, 0, 4, 0, 0, -2),
12602 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, -5, 0, 0, 0, 0, 0, 16, -6, 0, 0),
12603 new PlanetaryNutModel( 0, 0, 0, 0, 0, 1, -3, 0, 0, 0, 0, 0, 0, 8, -3, 0, 0),
12604 new PlanetaryNutModel( 0, 0, 0, 0, 0, -1, 3, 0, 0, 0, 0, 0, 1, 8, -31, -16, -4),
12605
12606 /* 421-430 */
12607 new PlanetaryNutModel( 0, 1,-1, 1, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0),
12608 new PlanetaryNutModel( 0, 0, 0, 0, 0, -1, 3, 0, 0, 0, 0, 0, 2, 113, 0, 0, -49),
12609 new PlanetaryNutModel( 0, 0, 0, 0, 0, -7, 10, 0, 0, 0, 0, 0, 2, 0, -24, -10, 0),
12610 new PlanetaryNutModel( 0, 0, 0, 0, 0, -7, 10, 0, 0, 0, 0, 0, 1, 4, 0, 0, -2),
12611 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, 27, 0, 0, 0),
12612 new PlanetaryNutModel( 0, 0, 0, 0, 0, -4, 8, 0, 0, 0, 0, 0, 2, -3, 0, 0, 1),
12613 new PlanetaryNutModel( 0, 0, 0, 0, 0, -4, 5, 0, 0, 0, 0, 0, 2, 0, -4, -2, 0),
12614 new PlanetaryNutModel( 0, 0, 0, 0, 0, -4, 5, 0, 0, 0, 0, 0, 1, 5, 0, 0, -2),
12615 new PlanetaryNutModel( 0, 0, 0, 0, 0, 4, -5, 0, 0, 0, 0, 0, 0, 0, -3, 0, 0),
12616 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 2, -13, 0, 0, 6),
12617
12618 /* 431-440 */
12619 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -2, 0, 5, 0, 0, 0, 2, 5, 0, 0, -2),
12620 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 2, -18, -10, -4, 8),
12621 new PlanetaryNutModel( 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -4, -28, 0, 0),
12622 new PlanetaryNutModel( 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2, -5, 6, 3, 2),
12623 new PlanetaryNutModel( 0, 0, 0, 0, 0, -9, 13, 0, 0, 0, 0, 0, 2, -3, 0, 0, 1),
12624 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -1, 5, 0, 0, 0, 0, 2, -5, -9, -4, 2),
12625 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -2, 0, 4, 0, 0, 0, 2, 17, 0, 0, -7),
12626 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0,-4, 0, 0, 0, 0, 11, 4, 0, 0),
12627 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -2, 7, 0, 0, 0, 0, 2, 0, -6, -2, 0),
12628 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0,-3, 0, 0, 0, 0, 83, 15, 0, 0),
12629
12630 /* 441-450 */
12631 new PlanetaryNutModel( 0, 0, 0, 0, 0, -2, 5, 0, 0, 0, 0, 0, 1, -4, 0, 0, 2),
12632 new PlanetaryNutModel( 0, 0, 0, 0, 0, -2, 5, 0, 0, 0, 0, 0, 2, 0,-114, -49, 0),
12633 new PlanetaryNutModel( 0, 0, 0, 0, 0, -6, 8, 0, 0, 0, 0, 0, 2, 117, 0, 0, -51),
12634 new PlanetaryNutModel( 0, 0, 0, 0, 0, -6, 8, 0, 0, 0, 0, 0, 1, -5, 19, 10, 2),
12635 new PlanetaryNutModel( 0, 0, 0, 0, 0, 6, -8, 0, 0, 0, 0, 0, 0, -3, 0, 0, 0),
12636 new PlanetaryNutModel( 0, 0, 0, 1, 0, 0, 2, 0,-2, 0, 0, 0, 0, -3, 0, 0, 2),
12637 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -3, 9, 0, 0, 0, 0, 2, 0, -3, -1, 0),
12638 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0, 3, 0, 0, 0),
12639 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 2, 0, -6, -2, 0),
12640 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0,-2, 0, 0, 0, 0, 393, 3, 0, 0),
12641
12642 /* 451-460 */
12643 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0,-2, 0, 0, 0, 1, -4, 21, 11, 2),
12644 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0,-2, 0, 0, 0, 2, -6, 0, -1, 3),
12645 new PlanetaryNutModel( 0, 0, 0, 0, 0, -5, 10, 0, 0, 0, 0, 0, 2, -3, 8, 4, 1),
12646 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, 8, 0, 0, 0),
12647 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 2, 18, -29, -13, -8),
12648 new PlanetaryNutModel( 0, 0, 0, 0, 0, -3, 3, 0, 0, 0, 0, 0, 1, 8, 34, 18, -4),
12649 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, 0, 89, 0, 0, 0),
12650 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, 1, 3, 12, 6, -1),
12651 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, 2, 54, -15, -7, -24),
12652 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0, 0,-3, 0, 0, 0, 0, 3, 0, 0),
12653
12654 /* 461-470 */
12655 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -5, 13, 0, 0, 0, 0, 2, 3, 0, 0, -1),
12656 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0,-1, 0, 0, 0, 0, 0, 35, 0, 0),
12657 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0,-1, 0, 0, 0, 2, -154, -30, -13, 67),
12658 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0, 0,-2, 0, 0, 0, 15, 0, 0, 0),
12659 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0, 0,-2, 0, 0, 1, 0, 4, 2, 0),
12660 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, -2, 0, 0, 0, 0, 0, 0, 9, 0, 0),
12661 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, -2, 0, 0, 0, 0, 2, 80, -71, -31, -35),
12662 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0, 0,-1, 0, 0, 2, 0, -20, -9, 0),
12663 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -6, 15, 0, 0, 0, 0, 2, 11, 5, 2, -5),
12664 new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 15, 0, 0, 0, 0, 0, 2, 61, -96, -42, -27),
12665
12666 /* 471-480 */
12667 new PlanetaryNutModel( 0, 0, 0, 0, 0, -3, 9, -4, 0, 0, 0, 0, 2, 14, 9, 4, -6),
12668 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0, 2,-5, 0, 0, 2, -11, -6, -3, 5),
12669 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -2, 8,-1,-5, 0, 0, 2, 0, -3, -1, 0),
12670 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 6, -8, 3, 0, 0, 0, 2, 123,-415, -180, -53),
12671 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, -35),
12672 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, -5, 0, 0, 0),
12673 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 7, -32, -17, -4),
12674 new PlanetaryNutModel( 0, 1,-1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -9, -5, 0),
12675 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, -4, 2, 0),
12676 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, -89, 0, 0, 38),
12677
12678 /* 481-490 */
12679 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -6, 16,-4,-5, 0, 0, 2, 0, -86, -19, -6),
12680 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -2, 8,-3, 0, 0, 0, 2, 0, 0, -19, 6),
12681 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -2, 8,-3, 0, 0, 0, 2, -123,-416, -180, 53),
12682 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 6, -8, 1, 5, 0, 0, 2, 0, -3, -1, 0),
12683 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0,-2, 5, 0, 0, 2, 12, -6, -3, -5),
12684 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -5, 4, 0, 0, 0, 0, 2, -13, 9, 4, 6),
12685 new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 11, 0, 0, 0, 0, 0, 2, 0, -15, -7, 0),
12686 new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 11, 0, 0, 0, 0, 0, 1, 3, 0, 0, -1),
12687 new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 11, 0, 0, 0, 0, 0, 2, -62, -97, -42, 27),
12688 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 2, -11, 5, 2, 5),
12689
12690 /* 491-500 */
12691 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 2, 0, -19, -8, 0),
12692 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -3, 0, 2, 0, 0, 0, 2, -3, 0, 0, 1),
12693 new PlanetaryNutModel( 0, 2,-2, 1, 0, 0, 4, -8, 3, 0, 0, 0, 0, 0, 4, 2, 0),
12694 new PlanetaryNutModel( 0, 1,-1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0),
12695 new PlanetaryNutModel( 0, 2,-2, 1, 0, 0, -4, 8,-3, 0, 0, 0, 0, 0, 4, 2, 0),
12696 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 2, -85, -70, -31, 37),
12697 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 163, -12, -5, -72),
12698 new PlanetaryNutModel( 0, 0, 0, 0, 0, -3, 7, 0, 0, 0, 0, 0, 2, -63, -16, -7, 28),
12699 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 2, -21, -32, -14, 9),
12700 new PlanetaryNutModel( 0, 0, 0, 0, 0, -5, 6, 0, 0, 0, 0, 0, 2, 0, -3, -1, 0),
12701
12702 /* 501-510 */
12703 new PlanetaryNutModel( 0, 0, 0, 0, 0, -5, 6, 0, 0, 0, 0, 0, 1, 3, 0, 0, -2),
12704 new PlanetaryNutModel( 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0),
12705 new PlanetaryNutModel( 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0, 2, 3, 10, 4, -1),
12706 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 2, 3, 0, 0, -1),
12707 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -1, 6, 0, 0, 0, 0, 2, 0, -7, -3, 0),
12708 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 7, -9, 0, 0, 0, 0, 2, 0, -4, -2, 0),
12709 new PlanetaryNutModel( 0, 0, 0, 0, 0, 2, -1, 0, 0, 0, 0, 0, 0, 6, 19, 0, 0),
12710 new PlanetaryNutModel( 0, 0, 0, 0, 0, 2, -1, 0, 0, 0, 0, 0, 2, 5,-173, -75, -2),
12711 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 6, -7, 0, 0, 0, 0, 2, 0, -7, -3, 0),
12712 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 2, 7, -12, -5, -3),
12713
12714 /* 511-520 */
12715 new PlanetaryNutModel( 0, 0, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 1, -3, 0, 0, 2),
12716 new PlanetaryNutModel( 0, 0, 0, 0, 0, -1, 4, 0, 0, 0, 0, 0, 2, 3, -4, -2, -1),
12717 new PlanetaryNutModel( 0, 0, 0, 0, 0, -7, 9, 0, 0, 0, 0, 0, 2, 74, 0, 0, -32),
12718 new PlanetaryNutModel( 0, 0, 0, 0, 0, -7, 9, 0, 0, 0, 0, 0, 1, -3, 12, 6, 2),
12719 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, -3, 0, 0, 0, 0, 2, 26, -14, -6, -11),
12720 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, -1, 0, 0, 0, 0, 2, 19, 0, 0, -8),
12721 new PlanetaryNutModel( 0, 0, 0, 0, 0, -4, 4, 0, 0, 0, 0, 0, 1, 6, 24, 13, -3),
12722 new PlanetaryNutModel( 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, 0, 83, 0, 0, 0),
12723 new PlanetaryNutModel( 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, 1, 0, -10, -5, 0),
12724 new PlanetaryNutModel( 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, 2, 11, -3, -1, -5),
12725
12726 /* 521-530 */
12727 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 2, 3, 0, 1, -1),
12728 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -3, 0, 5, 0, 0, 0, 2, 3, 0, 0, -1),
12729 new PlanetaryNutModel( 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, -4, 0, 0, 0),
12730 new PlanetaryNutModel( 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 5, -23, -12, -3),
12731 new PlanetaryNutModel( 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 2, -339, 0, 0, 147),
12732 new PlanetaryNutModel( 0, 0, 0, 0, 0, -9, 12, 0, 0, 0, 0, 0, 2, 0, -10, -5, 0),
12733 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, 0,-4, 0, 0, 0, 0, 5, 0, 0, 0),
12734 new PlanetaryNutModel( 0, 2,-2, 1, 0, 1, -1, 0, 0, 0, 0, 0, 0, 3, 0, 0, -1),
12735 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 7, -8, 0, 0, 0, 0, 2, 0, -4, -2, 0),
12736 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, 0,-3, 0, 0, 0, 0, 18, -3, 0, 0),
12737
12738 /* 531-540 */
12739 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, 0,-3, 0, 0, 0, 2, 9, -11, -5, -4),
12740 new PlanetaryNutModel( 0, 0, 0, 0, 0, -2, 6, 0, 0, 0, 0, 0, 2, -8, 0, 0, 4),
12741 new PlanetaryNutModel( 0, 0, 0, 0, 0, -6, 7, 0, 0, 0, 0, 0, 1, 3, 0, 0, -1),
12742 new PlanetaryNutModel( 0, 0, 0, 0, 0, 6, -7, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0),
12743 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 6, -6, 0, 0, 0, 0, 2, 6, -9, -4, -2),
12744 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, 0,-2, 0, 0, 0, 0, -4, -12, 0, 0),
12745 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, 0,-2, 0, 0, 0, 2, 67, -91, -39, -29),
12746 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 5, -4, 0, 0, 0, 0, 2, 30, -18, -8, -13),
12747 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
12748 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -2, 0, 0, 0, 0, 0, 2, 0,-114, -50, 0),
12749
12750 /* 541-550 */
12751 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, 0,-1, 0, 0, 0, 2, 0, 0, 0, 23),
12752 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, 0,-1, 0, 0, 0, 2, 517, 16, 7,-224),
12753 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, 0, 0,-2, 0, 0, 2, 0, -7, -3, 0),
12754 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 2, 143, -3, -1, -62),
12755 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, 0, 0,-1, 0, 0, 2, 29, 0, 0, -13),
12756 new PlanetaryNutModel( 0, 2,-2, 1, 0, 0, 1, 0,-1, 0, 0, 0, 0, -4, 0, 0, 2),
12757 new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 16, 0, 0, 0, 0, 0, 2, -6, 0, 0, 3),
12758 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, 0, 2,-5, 0, 0, 2, 5, 12, 5, -2),
12759 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 7, -8, 3, 0, 0, 0, 2, -25, 0, 0, 11),
12760 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -5, 16,-4,-5, 0, 0, 2, -3, 0, 0, 1),
12761
12762 /* 551-560 */
12763 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 2, 0, 4, 2, 0),
12764 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, -1, 8,-3, 0, 0, 0, 2, -22, 12, 5, 10),
12765 new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 10, 0, 0, 0, 0, 0, 2, 50, 0, 0, -22),
12766 new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 10, 0, 0, 0, 0, 0, 1, 0, 7, 4, 0),
12767 new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 10, 0, 0, 0, 0, 0, 2, 0, 3, 1, 0),
12768 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 2, -4, 4, 2, 2),
12769 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 3, 0, 1, 0, 0, 0, 2, -5, -11, -5, 2),
12770 new PlanetaryNutModel( 0, 0, 0, 0, 0, -3, 8, 0, 0, 0, 0, 0, 2, 0, 4, 2, 0),
12771 new PlanetaryNutModel( 0, 0, 0, 0, 0, -5, 5, 0, 0, 0, 0, 0, 1, 4, 17, 9, -2),
12772 new PlanetaryNutModel( 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 0, 0, 59, 0, 0, 0),
12773
12774 /* 561-570 */
12775 new PlanetaryNutModel( 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 0, 1, 0, -4, -2, 0),
12776 new PlanetaryNutModel( 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 0, 2, -8, 0, 0, 4),
12777 new PlanetaryNutModel( 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, -3, 0, 0, 0),
12778 new PlanetaryNutModel( 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 4, -15, -8, -2),
12779 new PlanetaryNutModel( 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 370, -8, 0,-160),
12780 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 7, -7, 0, 0, 0, 0, 2, 0, 0, -3, 0),
12781 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 7, -7, 0, 0, 0, 0, 2, 0, 3, 1, 0),
12782 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 6, -5, 0, 0, 0, 0, 2, -6, 3, 1, 3),
12783 new PlanetaryNutModel( 0, 0, 0, 0, 0, 7, -8, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0),
12784 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 5, -3, 0, 0, 0, 0, 2, -10, 0, 0, 4),
12785
12786 /* 571-580 */
12787 new PlanetaryNutModel( 0, 0, 0, 0, 0, 4, -3, 0, 0, 0, 0, 0, 2, 0, 9, 4, 0),
12788 new PlanetaryNutModel( 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 2, 4, 17, 7, -2),
12789 new PlanetaryNutModel( 0, 0, 0, 0, 0, -9, 11, 0, 0, 0, 0, 0, 2, 34, 0, 0, -15),
12790 new PlanetaryNutModel( 0, 0, 0, 0, 0, -9, 11, 0, 0, 0, 0, 0, 1, 0, 5, 3, 0),
12791 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, 0,-4, 0, 0, 0, 2, -5, 0, 0, 2),
12792 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, 0,-3, 0, 0, 0, 2, -37, -7, -3, 16),
12793 new PlanetaryNutModel( 0, 0, 0, 0, 0, -6, 6, 0, 0, 0, 0, 0, 1, 3, 13, 7, -2),
12794 new PlanetaryNutModel( 0, 0, 0, 0, 0, 6, -6, 0, 0, 0, 0, 0, 0, 40, 0, 0, 0),
12795 new PlanetaryNutModel( 0, 0, 0, 0, 0, 6, -6, 0, 0, 0, 0, 0, 1, 0, -3, -2, 0),
12796 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, 0,-2, 0, 0, 0, 2, -184, -3, -1, 80),
12797
12798 /* 581-590 */
12799 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 6, -4, 0, 0, 0, 0, 2, -3, 0, 0, 1),
12800 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -1, 0, 0, 0, 0, 0, 0, -3, 0, 0, 0),
12801 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -1, 0, 0, 0, 0, 0, 1, 0, -10, -6, -1),
12802 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, -1, 0, 0, 0, 0, 0, 2, 31, -6, 0, -13),
12803 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, 0,-1, 0, 0, 0, 2, -3, -32, -14, 1),
12804 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, 0, 0,-2, 0, 0, 2, -7, 0, 0, 3),
12805 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 5, -2, 0, 0, 0, 0, 2, 0, -8, -4, 0),
12806 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 3, -4, 0, 0),
12807 new PlanetaryNutModel( 0, 0, 0, 0, 0, 8, -9, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0),
12808 new PlanetaryNutModel( 0, 0, 0, 0, 0, 5, -4, 0, 0, 0, 0, 0, 2, 0, 3, 1, 0),
12809
12810 /* 591-600 */
12811 new PlanetaryNutModel( 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 2, 19, -23, -10, 2),
12812 new PlanetaryNutModel( 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, -10),
12813 new PlanetaryNutModel( 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 1, 0, 3, 2, 0),
12814 new PlanetaryNutModel( 0, 0, 0, 0, 0, -7, 7, 0, 0, 0, 0, 0, 1, 0, 9, 5, -1),
12815 new PlanetaryNutModel( 0, 0, 0, 0, 0, 7, -7, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0),
12816 new PlanetaryNutModel( 0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 0, 1, 0, -7, -4, 0),
12817 new PlanetaryNutModel( 0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 0, 2, 8, -4, 0, -4),
12818 new PlanetaryNutModel( 0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0),
12819 new PlanetaryNutModel( 0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0),
12820 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 5, 0,-4, 0, 0, 0, 2, -3, 0, 0, 1),
12821
12822 /* 601-610 */
12823 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 5, 0,-3, 0, 0, 0, 2, -9, 0, 1, 4),
12824 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 5, 0,-2, 0, 0, 0, 2, 3, 12, 5, -1),
12825 new PlanetaryNutModel( 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 2, 17, -3, -1, 0),
12826 new PlanetaryNutModel( 0, 0, 0, 0, 0, -8, 8, 0, 0, 0, 0, 0, 1, 0, 7, 4, 0),
12827 new PlanetaryNutModel( 0, 0, 0, 0, 0, 8, -8, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0),
12828 new PlanetaryNutModel( 0, 0, 0, 0, 0, 5, -3, 0, 0, 0, 0, 0, 1, 0, -5, -3, 0),
12829 new PlanetaryNutModel( 0, 0, 0, 0, 0, 5, -3, 0, 0, 0, 0, 0, 2, 14, -3, 0, -1),
12830 new PlanetaryNutModel( 0, 0, 0, 0, 0, -9, 9, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0),
12831 new PlanetaryNutModel( 0, 0, 0, 0, 0, -9, 9, 0, 0, 0, 0, 0, 1, 0, 0, 0, -5),
12832 new PlanetaryNutModel( 0, 0, 0, 0, 0, -9, 9, 0, 0, 0, 0, 0, 1, 0, 5, 3, 0),
12833
12834 /* 611-620 */
12835 new PlanetaryNutModel( 0, 0, 0, 0, 0, 9, -9, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0),
12836 new PlanetaryNutModel( 0, 0, 0, 0, 0, 6, -4, 0, 0, 0, 0, 0, 1, 0, -3, -2, 0),
12837 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 2, 2, 9, 4, 3),
12838 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4),
12839 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0),
12840 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 1, 0, 4, 2, 0),
12841 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 2, 6, 0, 0, -3),
12842 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0),
12843 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 1, 0, 3, 1, 0),
12844 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 2, 5, 0, 0, -2),
12845
12846 /* 621-630 */
12847 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 0, 0, -1),
12848 new PlanetaryNutModel( 1, 0,-2, 0, 0, 0, 2, 0,-2, 0, 0, 0, 0, -3, 0, 0, 0),
12849 new PlanetaryNutModel( 1, 0,-2, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0),
12850 new PlanetaryNutModel( 1, 0,-2, 0, 0, 0, 1, 0,-1, 0, 0, 0, 0, 7, 0, 0, 0),
12851 new PlanetaryNutModel( 1, 0,-2, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, -4, 0, 0, 0),
12852 new PlanetaryNutModel(-1, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0),
12853 new PlanetaryNutModel(-1, 0, 0, 0, 0, 0, 2, 0,-2, 0, 0, 0, 0, 6, 0, 0, 0),
12854 new PlanetaryNutModel(-1, 0, 2, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0, 0, -4, 0, 0),
12855 new PlanetaryNutModel( 1, 0,-2, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0, 0, -4, 0, 0),
12856 new PlanetaryNutModel(-2, 0, 2, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0, 5, 0, 0, 0),
12857
12858 /* 631-640 */
12859 new PlanetaryNutModel(-1, 0, 0, 0, 0, 0, 2, 0,-3, 0, 0, 0, 0, -3, 0, 0, 0),
12860 new PlanetaryNutModel(-1, 0, 0, 0, 0, 0, 1, 0,-1, 0, 0, 0, 0, 4, 0, 0, 0),
12861 new PlanetaryNutModel(-1, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, -5, 0, 0, 0),
12862 new PlanetaryNutModel(-1, 0, 2, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0),
12863 new PlanetaryNutModel( 1,-1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0),
12864 new PlanetaryNutModel(-1, 0, 2, 0, 0, 0, 2, 0,-3, 0, 0, 0, 0, 13, 0, 0, 0),
12865 new PlanetaryNutModel(-2, 0, 0, 0, 0, 0, 2, 0,-3, 0, 0, 0, 0, 21, 11, 0, 0),
12866 new PlanetaryNutModel( 1, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0, 0, -5, 0, 0),
12867 new PlanetaryNutModel(-1, 1,-1, 1, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, -5, -2, 0),
12868 new PlanetaryNutModel( 1, 1,-1, 1, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 5, 3, 0),
12869
12870 /* 641-650 */
12871 new PlanetaryNutModel(-1, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0, 0, -5, 0, 0),
12872 new PlanetaryNutModel(-1, 0, 2, 1, 0, 0, 2, 0,-2, 0, 0, 0, 0, -3, 0, 0, 2),
12873 new PlanetaryNutModel( 0, 0, 0, 0, 0, 0, 2, 0,-2, 0, 0, 0, 0, 20, 10, 0, 0),
12874 new PlanetaryNutModel(-1, 0, 2, 0, 0, 0, 2, 0,-2, 0, 0, 0, 0, -34, 0, 0, 0),
12875 new PlanetaryNutModel(-1, 0, 2, 0, 0, 3, -3, 0, 0, 0, 0, 0, 0, -19, 0, 0, 0),
12876 new PlanetaryNutModel( 1, 0,-2, 1, 0, 0, -2, 0, 2, 0, 0, 0, 0, 3, 0, 0, -2),
12877 new PlanetaryNutModel( 1, 2,-2, 2, 0, -3, 3, 0, 0, 0, 0, 0, 0, -3, 0, 0, 1),
12878 new PlanetaryNutModel( 1, 2,-2, 2, 0, 0, -2, 0, 2, 0, 0, 0, 0, -6, 0, 0, 3),
12879 new PlanetaryNutModel( 1, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0, -4, 0, 0, 0),
12880 new PlanetaryNutModel( 1, 0, 0, 0, 0, 0, 1, 0,-1, 0, 0, 0, 0, 3, 0, 0, 0),
12881
12882 /* 651-660 */
12883 new PlanetaryNutModel( 0, 0,-2, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0),
12884 new PlanetaryNutModel( 0, 0,-2, 0, 0, 0, 1, 0,-1, 0, 0, 0, 0, 4, 0, 0, 0),
12885 new PlanetaryNutModel( 0, 2, 0, 2, 0, -2, 2, 0, 0, 0, 0, 0, 0, 3, 0, 0, -1),
12886 new PlanetaryNutModel( 0, 2, 0, 2, 0, 0, -1, 0, 1, 0, 0, 0, 0, 6, 0, 0, -3),
12887 new PlanetaryNutModel( 0, 2, 0, 2, 0, -1, 1, 0, 0, 0, 0, 0, 0, -8, 0, 0, 3),
12888 new PlanetaryNutModel( 0, 2, 0, 2, 0, -2, 3, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0),
12889 new PlanetaryNutModel( 0, 0, 2, 0, 0, 0, 2, 0,-2, 0, 0, 0, 0, -3, 0, 0, 0),
12890 new PlanetaryNutModel( 0, 1, 1, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -3, -2, 0),
12891 new PlanetaryNutModel( 1, 2, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 126, -63, -27, -55),
12892 new PlanetaryNutModel(-1, 2, 0, 2, 0, 10, -3, 0, 0, 0, 0, 0, 0, -5, 0, 1, 2),
12893
12894 /* 661-670 */
12895 new PlanetaryNutModel( 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, -3, 28, 15, 2),
12896 new PlanetaryNutModel( 1, 2, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, 5, 0, 1, -2),
12897 new PlanetaryNutModel( 0, 2, 0, 2, 0, 0, 4, -8, 3, 0, 0, 0, 0, 0, 9, 4, 1),
12898 new PlanetaryNutModel( 0, 2, 0, 2, 0, 0, -4, 8,-3, 0, 0, 0, 0, 0, 9, 4, -1),
12899 new PlanetaryNutModel(-1, 2, 0, 2, 0, 0, -4, 8,-3, 0, 0, 0, 0, -126, -63, -27, 55),
12900 new PlanetaryNutModel( 2, 2,-2, 2, 0, 0, -2, 0, 3, 0, 0, 0, 0, 3, 0, 0, -1),
12901 new PlanetaryNutModel( 1, 2, 0, 1, 0, 0, -2, 0, 3, 0, 0, 0, 0, 21, -11, -6, -11),
12902 new PlanetaryNutModel( 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -4, 0, 0),
12903 new PlanetaryNutModel(-1, 2, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, -21, -11, -6, 11),
12904 new PlanetaryNutModel(-2, 2, 2, 2, 0, 0, 2, 0,-2, 0, 0, 0, 0, -3, 0, 0, 1),
12905
12906 /* 671-680 */
12907 new PlanetaryNutModel( 0, 2, 0, 2, 0, 2, -3, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0),
12908 new PlanetaryNutModel( 0, 2, 0, 2, 0, 1, -1, 0, 0, 0, 0, 0, 0, 8, 0, 0, -4),
12909 new PlanetaryNutModel( 0, 2, 0, 2, 0, 0, 1, 0,-1, 0, 0, 0, 0, -6, 0, 0, 3),
12910 new PlanetaryNutModel( 0, 2, 0, 2, 0, 2, -2, 0, 0, 0, 0, 0, 0, -3, 0, 0, 1),
12911 new PlanetaryNutModel(-1, 2, 2, 2, 0, 0, -1, 0, 1, 0, 0, 0, 0, 3, 0, 0, -1),
12912 new PlanetaryNutModel( 1, 2, 0, 2, 0, -1, 1, 0, 0, 0, 0, 0, 0, -3, 0, 0, 1),
12913 new PlanetaryNutModel(-1, 2, 2, 2, 0, 0, 2, 0,-3, 0, 0, 0, 0, -5, 0, 0, 2),
12914 new PlanetaryNutModel( 2, 2, 0, 2, 0, 0, 2, 0,-3, 0, 0, 0, 0, 24, -12, -5, -11),
12915 new PlanetaryNutModel( 1, 2, 0, 2, 0, 0, -4, 8,-3, 0, 0, 0, 0, 0, 3, 1, 0),
12916 new PlanetaryNutModel( 1, 2, 0, 2, 0, 0, 4, -8, 3, 0, 0, 0, 0, 0, 3, 1, 0),
12917
12918 /* 681-687 */
12919 new PlanetaryNutModel( 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0),
12920 new PlanetaryNutModel( 0, 2, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, -24, -12, -5, 10),
12921 new PlanetaryNutModel( 2, 2, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 4, 0, -1, -2),
12922 new PlanetaryNutModel(-1, 2, 2, 2, 0, 0, 2, 0,-2, 0, 0, 0, 0, 13, 0, 0, -6),
12923 new PlanetaryNutModel(-1, 2, 2, 2, 0, 3, -3, 0, 0, 0, 0, 0, 0, 7, 0, 0, -3),
12924 new PlanetaryNutModel( 1, 2, 0, 2, 0, 1, -1, 0, 0, 0, 0, 0, 0, 3, 0, 0, -1),
12925 new PlanetaryNutModel( 0, 2, 2, 2, 0, 0, 2, 0,-2, 0, 0, 0, 0, 3, 0, 0, -1)
12926 };
12927
12928 /* Number of terms in the planetary nutation model */
12929 final int NPL = xpl.length;
12930
12931 /*--------------------------------------------------------------------*/
12932
12933 /* Interval between fundamental date J2000.0 and given date (JC). */
12934 t = ((date1 - DJ00) + date2) / DJC;
12935
12936 /* ------------------- */
12937 /* LUNI-SOLAR NUTATION */
12938 /* ------------------- */
12939
12940 /* Fundamental (Delaunay) arguments */
12941
12942 /* Mean anomaly of the Moon (IERS 2003). */
12943 el = jauFal03(t);
12944
12945 /* Mean anomaly of the Sun (MHB2000). */
12946 elp = fmod(1287104.79305 +
12947 t * (129596581.0481 +
12948 t * (-0.5532 +
12949 t * (0.000136 +
12950 t * (-0.00001149)))), TURNAS) * DAS2R;
12951
12952 /* Mean longitude of the Moon minus that of the ascending node */
12953 /* (IERS 2003. */
12954 f = jauFaf03(t);
12955
12956 /* Mean elongation of the Moon from the Sun (MHB2000). */
12957 d = fmod(1072260.70369 +
12958 t * (1602961601.2090 +
12959 t * (-6.3706 +
12960 t * (0.006593 +
12961 t * (-0.00003169)))), TURNAS) * DAS2R;
12962
12963 /* Mean longitude of the ascending node of the Moon (IERS 2003). */
12964 om = jauFaom03(t);
12965
12966 /* Initialize the nutation values. */
12967 dp = 0.0;
12968 de = 0.0;
12969
12970 /* Summation of luni-solar nutation series (in reverse order). */
12971 for (i = NLS-1; i >= 0; i--) {
12972
12973 /* Argument and functions. */
12974 arg = fmod((double)xls[i].nl * el +
12975 (double)xls[i].nlp * elp +
12976 (double)xls[i].nf * f +
12977 (double)xls[i].nd * d +
12978 (double)xls[i].nom * om, D2PI);
12979 sarg = sin(arg);
12980 carg = cos(arg);
12981
12982 /* Term. */
12983 dp += (xls[i].sp + xls[i].spt * t) * sarg + xls[i].cp * carg;
12984 de += (xls[i].ce + xls[i].cet * t) * carg + xls[i].se * sarg;
12985 }
12986
12987 /* Convert from 0.1 microarcsec units to radians. */
12988 dpsils = dp * U2R;
12989 depsls = de * U2R;
12990
12991 /* ------------------ */
12992 /* PLANETARY NUTATION */
12993 /* ------------------ */
12994
12995 /* n.b. The MHB2000 code computes the luni-solar and planetary nutation */
12996 /* in different functions, using slightly different Delaunay */
12997 /* arguments in the two cases. This behaviour is faithfully */
12998 /* reproduced here. Use of the IERS 2003 expressions for both */
12999 /* cases leads to negligible changes, well below */
13000 /* 0.1 microarcsecond. */
13001
13002 /* Mean anomaly of the Moon (MHB2000). */
13003 al = fmod(2.35555598 + 8328.6914269554 * t, D2PI);
13004
13005 /* Mean longitude of the Moon minus that of the ascending node */
13006 /*(MHB2000). */
13007 af = fmod(1.627905234 + 8433.466158131 * t, D2PI);
13008
13009 /* Mean elongation of the Moon from the Sun (MHB2000). */
13010 ad = fmod(5.198466741 + 7771.3771468121 * t, D2PI);
13011
13012 /* Mean longitude of the ascending node of the Moon (MHB2000). */
13013 aom = fmod(2.18243920 - 33.757045 * t, D2PI);
13014
13015 /* General accumulated precession in longitude (IERS 2003). */
13016 apa = jauFapa03(t);
13017
13018 /* Planetary longitudes, Mercury through Uranus (IERS 2003). */
13019 alme = jauFame03(t);
13020 alve = jauFave03(t);
13021 alea = jauFae03(t);
13022 alma = jauFama03(t);
13023 alju = jauFaju03(t);
13024 alsa = jauFasa03(t);
13025 alur = jauFaur03(t);
13026
13027 /* Neptune longitude (MHB2000). */
13028 alne = fmod(5.321159000 + 3.8127774000 * t, D2PI);
13029
13030 /* Initialize the nutation values. */
13031 dp = 0.0;
13032 de = 0.0;
13033
13034 /* Summation of planetary nutation series (in reverse order). */
13035 for (i = NPL-1; i >= 0; i--) {
13036
13037 /* Argument and functions. */
13038 arg = fmod((double)xpl[i].nl * al +
13039 (double)xpl[i].nf * af +
13040 (double)xpl[i].nd * ad +
13041 (double)xpl[i].nom * aom +
13042 (double)xpl[i].nme * alme +
13043 (double)xpl[i].nve * alve +
13044 (double)xpl[i].nea * alea +
13045 (double)xpl[i].nma * alma +
13046 (double)xpl[i].nju * alju +
13047 (double)xpl[i].nsa * alsa +
13048 (double)xpl[i].nur * alur +
13049 (double)xpl[i].nne * alne +
13050 (double)xpl[i].npa * apa, D2PI);
13051 sarg = sin(arg);
13052 carg = cos(arg);
13053
13054 /* Term. */
13055 dp += (double)xpl[i].sp * sarg + (double)xpl[i].cp * carg;
13056 de += (double)xpl[i].se * sarg + (double)xpl[i].ce * carg;
13057
13058 }
13059
13060 /* Convert from 0.1 microarcsec units to radians. */
13061 dpsipl = dp * U2R;
13062 depspl = de * U2R;
13063
13064 /* ------- */
13065 /* RESULTS */
13066 /* ------- */
13067
13068 /* Add luni-solar and planetary components. */
13069 return new NutationTerms( dpsils + dpsipl,
13070 depsls + depspl);
13071 }
13072
13073
13074 /**
13075 * Nutation, IAU 2000B model.
13076 *
13077 *<p>This function is derived from the International Astronomical Union's
13078 * SOFA (Standards Of Fundamental Astronomy) software collection.
13079 *
13080 *<p>Status: canonical model.
13081 *
13082 *<!-- Given: -->
13083 * @param date1 double TT as a 2-part Julian Date (Note 1)
13084 * @param date2 double TT as a 2-part Julian Date (Note 1)
13085 *
13086 *<!-- Returned: -->
13087 * @return nutation, luni-solar + planetary (Note 2)
13088 *
13089 * <p>Notes:
13090 * <ol>
13091 *
13092 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
13093 * convenient way between the two arguments. For example,
13094 * JD(TT)=2450123.7 could be expressed in any of these ways,
13095 * among others:
13096 *<pre>
13097 * date1 date2
13098 *
13099 * 2450123.7 0.0 (JD method)
13100 * 2451545.0 -1421.3 (J2000 method)
13101 * 2400000.5 50123.2 (MJD method)
13102 * 2450123.5 0.2 (date & time method)
13103 *</pre>
13104 * The JD method is the most natural and convenient to use in
13105 * cases where the loss of several decimal digits of resolution
13106 * is acceptable. The J2000 method is best matched to the way
13107 * the argument is handled internally and will deliver the
13108 * optimum resolution. The MJD method and the date & time methods
13109 * are both good compromises between resolution and convenience.
13110 *
13111 * <li> The nutation components in longitude and obliquity are in radians
13112 * and with respect to the equinox and ecliptic of date. The
13113 * obliquity at J2000.0 is assumed to be the Lieske et al. (1977)
13114 * value of 84381.448 arcsec. (The errors that result from using
13115 * this function with the IAU 2006 value of 84381.406 arcsec can be
13116 * neglected.)
13117 *
13118 * The nutation model consists only of luni-solar terms, but
13119 * includes also a fixed offset which compensates for certain long-
13120 * period planetary terms (Note 7).
13121 *
13122 * <li> This function is an implementation of the IAU 2000B abridged
13123 * nutation model formally adopted by the IAU General Assembly in
13124 * 2000. The function computes the MHB_2000_SHORT luni-solar
13125 * nutation series (Luzum 2001), but without the associated
13126 * corrections for the precession rate adjustments and the offset
13127 * between the GCRS and J2000.0 mean poles.
13128 *
13129 * <li> The full IAU 2000A (MHB2000) nutation model contains nearly 1400
13130 * terms. The IAU 2000B model (McCarthy & Luzum 2003) contains only
13131 * 77 terms, plus additional simplifications, yet still delivers
13132 * results of 1 mas accuracy at present epochs. This combination of
13133 * accuracy and size makes the IAU 2000B abridged nutation model
13134 * suitable for most practical applications.
13135 *
13136 * The function delivers a pole accurate to 1 mas from 1900 to 2100
13137 * (usually better than 1 mas, very occasionally just outside
13138 * 1 mas). The full IAU 2000A model, which is implemented in the
13139 * function jauNut00a (q.v.), delivers considerably greater accuracy
13140 * at current dates; however, to realize this improved accuracy,
13141 * corrections for the essentially unpredictable free-core-nutation
13142 * (FCN) must also be included.
13143 *
13144 * <li> The present function provides classical nutation. The
13145 * MHB_2000_SHORT algorithm, from which it is adapted, deals also
13146 * with (i) the offsets between the GCRS and mean poles and (ii) the
13147 * adjustments in longitude and obliquity due to the changed
13148 * precession rates. These additional functions, namely frame bias
13149 * and precession adjustments, are supported by the JSOFA functions
13150 * jauBi00 and jauPr00.
13151 *
13152 * <li> The MHB_2000_SHORT algorithm also provides "total" nutations,
13153 * comprising the arithmetic sum of the frame bias, precession
13154 * adjustments, and nutation (luni-solar + planetary). These total
13155 * nutations can be used in combination with an existing IAU 1976
13156 * precession implementation, such as jauPmat76, to deliver GCRS-
13157 * to-true predictions of mas accuracy at current epochs. However,
13158 * for symmetry with the jauNut00a function (q.v. for the reasons),
13159 * the JSOFA functions do not generate the "total nutations"
13160 * directly. Should they be required, they could of course easily
13161 * be generated by calling jauBi00, jauPr00 and the present function
13162 * and adding the results.
13163 *
13164 * <li> The IAU 2000B model includes "planetary bias" terms that are
13165 * fixed in size but compensate for long-period nutations. The
13166 * amplitudes quoted in McCarthy & Luzum (2003), namely
13167 * Dpsi = -1.5835 mas and Depsilon = +1.6339 mas, are optimized for
13168 * the "total nutations" method described in Note 6. The Luzum
13169 * (2001) values used in this JSOFA implementation, namely -0.135 mas
13170 * and +0.388 mas, are optimized for the "rigorous" method, where
13171 * frame bias, precession and nutation are applied separately and in
13172 * that order. During the interval 1995-2050, the JSOFA
13173 * implementation delivers a maximum error of 1.001 mas (not
13174 * including FCN).
13175 *</ol>
13176 *<p>References:
13177 *
13178 * <p>Lieske, J.H., Lederle, T., Fricke, W., Morando, B., "Expressions
13179 * for the precession quantities based upon the IAU /1976/ system of
13180 * astronomical constants", Astron.Astrophys. 58, 1-2, 1-16. (1977)
13181 *
13182 * <p>Luzum, B., private communication, 2001 (Fortran code
13183 * MHB_2000_SHORT)
13184 *
13185 * <p>McCarthy, D.D. & Luzum, B.J., "An abridged model of the
13186 * precession-nutation of the celestial pole", Cel.Mech.Dyn.Astron.
13187 * 85, 37-49 (2003)
13188 *
13189 * <p>Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
13190 * Francou, G., Laskar, J., Astron.Astrophys. 282, 663-683 (1994)
13191 *
13192 *@version 2009 December 17
13193 *
13194 * @since Release 20101201
13195 *
13196 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
13197 */
13198 public static NutationTerms jauNut00b(double date1, double date2)
13199 {
13200 double t, el, elp, f, d, om, arg, dp, de, sarg, carg,
13201 dpsils, depsls, dpsipl, depspl;
13202 int i;
13203
13204 /* Units of 0.1 microarcsecond to radians */
13205 final double U2R = DAS2R / 1e7;
13206
13207 /* ---------------------------------------- */
13208 /* Fixed offsets in lieu of planetary terms */
13209 /* ---------------------------------------- */
13210
13211 final double DPPLAN = -0.135 * DMAS2R;
13212 final double DEPLAN = 0.388 * DMAS2R;
13213
13214 /* --------------------------------------------------- */
13215 /* Luni-solar nutation: argument and term coefficients */
13216 /* --------------------------------------------------- */
13217
13218 /* The units for the sine and cosine coefficients are */
13219 /* 0.1 microarcsec and the same per Julian century */
13220
13221 final class LSNutationModel
13222 {
13223 final int nl,nlp,nf,nd,nom; /* coefficients of l,l',F,D,Om */
13224 final double ps,pst,pc; /* longitude sin, t*sin, cos coefficients */
13225 final double ec,ect,es; /* obliquity cos, t*cos, sin coefficients */
13226
13227 public LSNutationModel( int nl,int nlp,int nf,int nd,int nom,
13228 double ps, double pst, double pc,
13229 double ec, double ect, double es ) {
13230 this.nl = nl;this.nlp = nlp;this.nf = nf;this.nd = nd;this.nom = nom;
13231 this.ps = ps;this.pst = pst;this.pc = pc;
13232 this.ec = ec;this.ect = ect; this.es= es;
13233 }
13234
13235 }
13236 LSNutationModel x[] = {
13237
13238 /* 1-10 */
13239 new LSNutationModel( 0, 0, 0, 0,1,
13240 -172064161.0, -174666.0, 33386.0, 92052331.0, 9086.0, 15377.0),
13241 new LSNutationModel( 0, 0, 2,-2,2,
13242 -13170906.0, -1675.0, -13696.0, 5730336.0, -3015.0, -4587.0),
13243 new LSNutationModel( 0, 0, 2, 0,2,-2276413.0,-234.0, 2796.0, 978459.0,-485.0,1374.0),
13244 new LSNutationModel( 0, 0, 0, 0,2,2074554.0, 207.0, -698.0,-897492.0, 470.0,-291.0),
13245 new LSNutationModel( 0, 1, 0, 0,0,1475877.0,-3633.0,11817.0, 73871.0,-184.0,-1924.0),
13246 new LSNutationModel( 0, 1, 2,-2,2,-516821.0, 1226.0, -524.0, 224386.0,-677.0,-174.0),
13247 new LSNutationModel( 1, 0, 0, 0,0, 711159.0, 73.0, -872.0, -6750.0, 0.0, 358.0),
13248 new LSNutationModel( 0, 0, 2, 0,1,-387298.0, -367.0, 380.0, 200728.0, 18.0, 318.0),
13249 new LSNutationModel( 1, 0, 2, 0,2,-301461.0, -36.0, 816.0, 129025.0, -63.0, 367.0),
13250 new LSNutationModel( 0,-1, 2,-2,2, 215829.0, -494.0, 111.0, -95929.0, 299.0, 132.0),
13251
13252 /* 11-20 */
13253 new LSNutationModel( 0, 0, 2,-2,1, 128227.0, 137.0, 181.0, -68982.0, -9.0, 39.0),
13254 new LSNutationModel(-1, 0, 2, 0,2, 123457.0, 11.0, 19.0, -53311.0, 32.0, -4.0),
13255 new LSNutationModel(-1, 0, 0, 2,0, 156994.0, 10.0, -168.0, -1235.0, 0.0, 82.0),
13256 new LSNutationModel( 1, 0, 0, 0,1, 63110.0, 63.0, 27.0, -33228.0, 0.0, -9.0),
13257 new LSNutationModel(-1, 0, 0, 0,1, -57976.0, -63.0, -189.0, 31429.0, 0.0, -75.0),
13258 new LSNutationModel(-1, 0, 2, 2,2, -59641.0, -11.0, 149.0, 25543.0, -11.0, 66.0),
13259 new LSNutationModel( 1, 0, 2, 0,1, -51613.0, -42.0, 129.0, 26366.0, 0.0, 78.0),
13260 new LSNutationModel(-2, 0, 2, 0,1, 45893.0, 50.0, 31.0, -24236.0, -10.0, 20.0),
13261 new LSNutationModel( 0, 0, 0, 2,0, 63384.0, 11.0, -150.0, -1220.0, 0.0, 29.0),
13262 new LSNutationModel( 0, 0, 2, 2,2, -38571.0, -1.0, 158.0, 16452.0, -11.0, 68.0),
13263
13264 /* 21-30 */
13265 new LSNutationModel( 0,-2, 2,-2,2, 32481.0, 0.0, 0.0, -13870.0, 0.0, 0.0),
13266 new LSNutationModel(-2, 0, 0, 2,0, -47722.0, 0.0, -18.0, 477.0, 0.0, -25.0),
13267 new LSNutationModel( 2, 0, 2, 0,2, -31046.0, -1.0, 131.0, 13238.0, -11.0, 59.0),
13268 new LSNutationModel( 1, 0, 2,-2,2, 28593.0, 0.0, -1.0, -12338.0, 10.0, -3.0),
13269 new LSNutationModel(-1, 0, 2, 0,1, 20441.0, 21.0, 10.0, -10758.0, 0.0, -3.0),
13270 new LSNutationModel( 2, 0, 0, 0,0, 29243.0, 0.0, -74.0, -609.0, 0.0, 13.0),
13271 new LSNutationModel( 0, 0, 2, 0,0, 25887.0, 0.0, -66.0, -550.0, 0.0, 11.0),
13272 new LSNutationModel( 0, 1, 0, 0,1, -14053.0, -25.0, 79.0, 8551.0, -2.0, -45.0),
13273 new LSNutationModel(-1, 0, 0, 2,1, 15164.0, 10.0, 11.0, -8001.0, 0.0, -1.0),
13274 new LSNutationModel( 0, 2, 2,-2,2, -15794.0, 72.0, -16.0, 6850.0, -42.0, -5.0),
13275
13276 /* 31-40 */
13277 new LSNutationModel( 0, 0,-2, 2,0, 21783.0, 0.0, 13.0, -167.0, 0.0, 13.0),
13278 new LSNutationModel( 1, 0, 0,-2,1, -12873.0, -10.0, -37.0, 6953.0, 0.0, -14.0),
13279 new LSNutationModel( 0,-1, 0, 0,1, -12654.0, 11.0, 63.0, 6415.0, 0.0, 26.0),
13280 new LSNutationModel(-1, 0, 2, 2,1, -10204.0, 0.0, 25.0, 5222.0, 0.0, 15.0),
13281 new LSNutationModel( 0, 2, 0, 0,0, 16707.0, -85.0, -10.0, 168.0, -1.0, 10.0),
13282 new LSNutationModel( 1, 0, 2, 2,2, -7691.0, 0.0, 44.0, 3268.0, 0.0, 19.0),
13283 new LSNutationModel(-2, 0, 2, 0,0, -11024.0, 0.0, -14.0, 104.0, 0.0, 2.0),
13284 new LSNutationModel( 0, 1, 2, 0,2, 7566.0, -21.0, -11.0, -3250.0, 0.0, -5.0),
13285 new LSNutationModel( 0, 0, 2, 2,1, -6637.0, -11.0, 25.0, 3353.0, 0.0, 14.0),
13286 new LSNutationModel( 0,-1, 2, 0,2, -7141.0, 21.0, 8.0, 3070.0, 0.0, 4.0),
13287
13288 /* 41-50 */
13289 new LSNutationModel( 0, 0, 0, 2,1, -6302.0, -11.0, 2.0, 3272.0, 0.0, 4.0),
13290 new LSNutationModel( 1, 0, 2,-2,1, 5800.0, 10.0, 2.0, -3045.0, 0.0, -1.0),
13291 new LSNutationModel( 2, 0, 2,-2,2, 6443.0, 0.0, -7.0, -2768.0, 0.0, -4.0),
13292 new LSNutationModel(-2, 0, 0, 2,1, -5774.0, -11.0, -15.0, 3041.0, 0.0, -5.0),
13293 new LSNutationModel( 2, 0, 2, 0,1, -5350.0, 0.0, 21.0, 2695.0, 0.0, 12.0),
13294 new LSNutationModel( 0,-1, 2,-2,1, -4752.0, -11.0, -3.0, 2719.0, 0.0, -3.0),
13295 new LSNutationModel( 0, 0, 0,-2,1, -4940.0, -11.0, -21.0, 2720.0, 0.0, -9.0),
13296 new LSNutationModel(-1,-1, 0, 2,0, 7350.0, 0.0, -8.0, -51.0, 0.0, 4.0),
13297 new LSNutationModel( 2, 0, 0,-2,1, 4065.0, 0.0, 6.0, -2206.0, 0.0, 1.0),
13298 new LSNutationModel( 1, 0, 0, 2,0, 6579.0, 0.0, -24.0, -199.0, 0.0, 2.0),
13299
13300 /* 51-60 */
13301 new LSNutationModel( 0, 1, 2,-2,1, 3579.0, 0.0, 5.0, -1900.0, 0.0, 1.0),
13302 new LSNutationModel( 1,-1, 0, 0,0, 4725.0, 0.0, -6.0, -41.0, 0.0, 3.0),
13303 new LSNutationModel(-2, 0, 2, 0,2, -3075.0, 0.0, -2.0, 1313.0, 0.0, -1.0),
13304 new LSNutationModel( 3, 0, 2, 0,2, -2904.0, 0.0, 15.0, 1233.0, 0.0, 7.0),
13305 new LSNutationModel( 0,-1, 0, 2,0, 4348.0, 0.0, -10.0, -81.0, 0.0, 2.0),
13306 new LSNutationModel( 1,-1, 2, 0,2, -2878.0, 0.0, 8.0, 1232.0, 0.0, 4.0),
13307 new LSNutationModel( 0, 0, 0, 1,0, -4230.0, 0.0, 5.0, -20.0, 0.0, -2.0),
13308 new LSNutationModel(-1,-1, 2, 2,2, -2819.0, 0.0, 7.0, 1207.0, 0.0, 3.0),
13309 new LSNutationModel(-1, 0, 2, 0,0, -4056.0, 0.0, 5.0, 40.0, 0.0, -2.0),
13310 new LSNutationModel( 0,-1, 2, 2,2, -2647.0, 0.0, 11.0, 1129.0, 0.0, 5.0),
13311
13312 /* 61-70 */
13313 new LSNutationModel(-2, 0, 0, 0,1, -2294.0, 0.0, -10.0, 1266.0, 0.0, -4.0),
13314 new LSNutationModel( 1, 1, 2, 0,2, 2481.0, 0.0, -7.0, -1062.0, 0.0, -3.0),
13315 new LSNutationModel( 2, 0, 0, 0,1, 2179.0, 0.0, -2.0, -1129.0, 0.0, -2.0),
13316 new LSNutationModel(-1, 1, 0, 1,0, 3276.0, 0.0, 1.0, -9.0, 0.0, 0.0),
13317 new LSNutationModel( 1, 1, 0, 0,0, -3389.0, 0.0, 5.0, 35.0, 0.0, -2.0),
13318 new LSNutationModel( 1, 0, 2, 0,0, 3339.0, 0.0, -13.0, -107.0, 0.0, 1.0),
13319 new LSNutationModel(-1, 0, 2,-2,1, -1987.0, 0.0, -6.0, 1073.0, 0.0, -2.0),
13320 new LSNutationModel( 1, 0, 0, 0,2, -1981.0, 0.0, 0.0, 854.0, 0.0, 0.0),
13321 new LSNutationModel(-1, 0, 0, 1,0, 4026.0, 0.0, -353.0, -553.0, 0.0,-139.0),
13322 new LSNutationModel( 0, 0, 2, 1,2, 1660.0, 0.0, -5.0, -710.0, 0.0, -2.0),
13323
13324 /* 71-77 */
13325 new LSNutationModel(-1, 0, 2, 4,2, -1521.0, 0.0, 9.0, 647.0, 0.0, 4.0),
13326 new LSNutationModel(-1, 1, 0, 1,1, 1314.0, 0.0, 0.0, -700.0, 0.0, 0.0),
13327 new LSNutationModel( 0,-2, 2,-2,1, -1283.0, 0.0, 0.0, 672.0, 0.0, 0.0),
13328 new LSNutationModel( 1, 0, 2, 2,1, -1331.0, 0.0, 8.0, 663.0, 0.0, 4.0),
13329 new LSNutationModel(-2, 0, 2, 2,2, 1383.0, 0.0, -2.0, -594.0, 0.0, -2.0),
13330 new LSNutationModel(-1, 0, 0, 0,2, 1405.0, 0.0, 4.0, -610.0, 0.0, 2.0),
13331 new LSNutationModel( 1, 1, 2,-2,2, 1290.0, 0.0, 0.0, -556.0, 0.0, 0.0)
13332 };
13333
13334 /* Number of terms in the series */
13335 final int NLS = x.length;
13336
13337 /*--------------------------------------------------------------------*/
13338
13339 /* Interval between fundamental epoch J2000.0 and given date (JC). */
13340 t = ((date1 - DJ00) + date2) / DJC;
13341
13342 /* --------------------*/
13343 /* LUNI-SOLAR NUTATION */
13344 /* --------------------*/
13345
13346 /* Fundamental (Delaunay) arguments from Simon et al. (1994) */
13347
13348 /* Mean anomaly of the Moon. */
13349 el = fmod(485868.249036 + (1717915923.2178) * t, TURNAS) * DAS2R;
13350
13351 /* Mean anomaly of the Sun. */
13352 elp = fmod(1287104.79305 + (129596581.0481) * t, TURNAS) * DAS2R;
13353
13354 /* Mean argument of the latitude of the Moon. */
13355 f = fmod(335779.526232 + (1739527262.8478) * t, TURNAS) * DAS2R;
13356
13357 /* Mean elongation of the Moon from the Sun. */
13358 d = fmod(1072260.70369 + (1602961601.2090) * t, TURNAS) * DAS2R;
13359
13360 /* Mean longitude of the ascending node of the Moon. */
13361 om = fmod(450160.398036 + (-6962890.5431) * t, TURNAS) * DAS2R;
13362
13363 /* Initialize the nutation values. */
13364 dp = 0.0;
13365 de = 0.0;
13366
13367 /* Summation of luni-solar nutation series (smallest terms first). */
13368 for (i = NLS-1; i >= 0; i--) {
13369
13370 /* Argument and functions. */
13371 arg = fmod( (double)x[i].nl * el +
13372 (double)x[i].nlp * elp +
13373 (double)x[i].nf * f +
13374 (double)x[i].nd * d +
13375 (double)x[i].nom * om, D2PI );
13376 sarg = sin(arg);
13377 carg = cos(arg);
13378
13379 /* Term. */
13380 dp += (x[i].ps + x[i].pst * t) * sarg + x[i].pc * carg;
13381 de += (x[i].ec + x[i].ect * t) * carg + x[i].es * sarg;
13382 }
13383
13384 /* Convert from 0.1 microarcsec units to radians. */
13385 dpsils = dp * U2R;
13386 depsls = de * U2R;
13387
13388 /* ------------------------------*/
13389 /* IN LIEU OF PLANETARY NUTATION */
13390 /* ------------------------------*/
13391
13392 /* Fixed offset to correct for missing terms in truncated series. */
13393 dpsipl = DPPLAN;
13394 depspl = DEPLAN;
13395
13396 /* --------*/
13397 /* RESULTS */
13398 /* --------*/
13399
13400 /* Add luni-solar and planetary components. */
13401 return new NutationTerms( dpsils + dpsipl,
13402 depsls + depspl);
13403
13404 }
13405
13406
13407 /**
13408 * IAU 2000A nutation with adjustments to match the IAU 2006
13409 * precession.
13410 *
13411 *<!-- Given: -->
13412 * @param date1 double TT as a 2-part Julian Date (Note 1)
13413 * @param date2 double TT as a 2-part Julian Date (Note 1)
13414 *
13415 *<!-- Returned: -->
13416 * @return nutation, luni-solar + planetary (Note 2)
13417 *
13418 *<p>Status: canonical model.
13419 *
13420 * <p>Notes:
13421 * <ol>
13422 *
13423 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
13424 * convenient way between the two arguments. For example,
13425 * JD(TT)=2450123.7 could be expressed in any of these ways,
13426 * among others:
13427 *<pre>
13428 * date1 date2
13429 *
13430 * 2450123.7 0.0 (JD method)
13431 * 2451545.0 -1421.3 (J2000 method)
13432 * 2400000.5 50123.2 (MJD method)
13433 * 2450123.5 0.2 (date & time method)
13434 *</pre>
13435 * The JD method is the most natural and convenient to use in
13436 * cases where the loss of several decimal digits of resolution
13437 * is acceptable. The J2000 method is best matched to the way
13438 * the argument is handled internally and will deliver the
13439 * optimum resolution. The MJD method and the date & time methods
13440 * are both good compromises between resolution and convenience.
13441 *
13442 * <li> The nutation components in longitude and obliquity are in radians
13443 * and with respect to the mean equinox and ecliptic of date,
13444 * IAU 2006 precession model (Hilton et al. 2006, Capitaine et al.
13445 * 2005).
13446 *
13447 * <li> The function first computes the IAU 2000A nutation, then applies
13448 * adjustments for (i) the consequences of the change in obliquity
13449 * from the IAU 1980 ecliptic to the IAU 2006 ecliptic and (ii) the
13450 * secular variation in the Earth's dynamical flattening.
13451 *
13452 * <li> The present function provides classical nutation, complementing
13453 * the IAU 2000 frame bias and IAU 2006 precession. It delivers a
13454 * pole which is at current epochs accurate to a few tens of
13455 * microarcseconds, apart from the free core nutation.
13456 *</ol>
13457 *<p>Called:<ul>
13458 * <li>{@link #jauNut00a} nutation, IAU 2000A
13459 * </ul>
13460 *<p>References:
13461 *
13462 * <p>Chapront, J., Chapront-Touze, M. & Francou, G. 2002,
13463 * Astron.Astrophys. 387, 700
13464 *
13465 * <p>Lieske, J.H., Lederle, T., Fricke, W. & Morando, B. 1977,
13466 * Astron.Astrophys. 58, 1-16
13467 *
13468 * <p>Mathews, P.M., Herring, T.A., Buffet, B.A. 2002, J.Geophys.Res.
13469 * 107, B4. The MHB_2000 code itself was obtained on 9th September
13470 * 2002 from ftp//maia.usno.navy.mil/conv2000/chapter5/IAU2000A.
13471 *
13472 * <p>Simon, J.-L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
13473 * Francou, G., Laskar, J. 1994, Astron.Astrophys. 282, 663-683
13474 *
13475 * <p>Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M. 1999,
13476 * Astron.Astrophys.Supp.Ser. 135, 111
13477 *
13478 * <p>Wallace, P.T., "Software for Implementing the IAU 2000
13479 * Resolutions", in IERS Workshop 5.1 (2002)
13480 *
13481 *@version 2008 May 24
13482 *
13483 * @since Release 20101201
13484 *
13485 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
13486 */
13487 public static NutationTerms jauNut06a(double date1, double date2)
13488 {
13489 double t, fj2;
13490
13491
13492 /* Interval between fundamental date J2000.0 and given date (JC). */
13493 t = ((date1 - DJ00) + date2) / DJC;
13494
13495 /* Factor correcting for secular variation of J2. */
13496 fj2 = -2.7774e-6 * t;
13497
13498 /* Obtain IAU 2000A nutation. */
13499 NutationTerms nt = jauNut00a(date1, date2);
13500
13501 /* Apply P03 adjustments (Wallace & Capitaine, 2006, Eqs.5). */
13502 return new NutationTerms( nt.dpsi + nt.dpsi * (0.4697e-6 + fj2),
13503 nt.deps + nt.deps * fj2);
13504
13505 }
13506
13507 /**
13508 * Nutation, IAU 1980 model.
13509 *
13510 *<p>This function is derived from the International Astronomical Union's
13511 * SOFA (Standards Of Fundamental Astronomy) software collection.
13512 *
13513 *<p>Status: canonical model.
13514 *
13515 *<!-- Given: -->
13516 * @param date1 double TT as a 2-part Julian Date (Note 1)
13517 * @param date2 double TT as a 2-part Julian Date (Note 1)
13518 *
13519 *<!-- Returned: -->
13520 * @return dpsi double <u>returned</u> nutation in longitude (radians)
13521 * deps double <u>returned</u> nutation in obliquity (radians)
13522 *
13523 * <p>Notes:
13524 * <ol>
13525 *
13526 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
13527 * convenient way between the two arguments. For example,
13528 * JD(TT)=2450123.7 could be expressed in any of these ways,
13529 * among others:
13530 *<pre>
13531 * date1 date2
13532 *
13533 * 2450123.7 0.0 (JD method)
13534 * 2451545.0 -1421.3 (J2000 method)
13535 * 2400000.5 50123.2 (MJD method)
13536 * 2450123.5 0.2 (date & time method)
13537 *</pre>
13538 * The JD method is the most natural and convenient to use in
13539 * cases where the loss of several decimal digits of resolution
13540 * is acceptable. The J2000 method is best matched to the way
13541 * the argument is handled internally and will deliver the
13542 * optimum resolution. The MJD method and the date & time methods
13543 * are both good compromises between resolution and convenience.
13544 *
13545 * <li> The nutation components are with respect to the ecliptic of
13546 * date.
13547 *</ol>
13548 *<p>Called:<ul>
13549 * <li>{@link #jauAnpm} normalize angle into range +/- pi
13550 * </ul>
13551 *<p>Reference:
13552 *
13553 * <p>Explanatory Supplement to the Astronomical Almanac,
13554 * P. Kenneth Seidelmann (ed), University Science Books (1992),
13555 * Section 3.222 (p111).
13556 *
13557 *@version 2008 September 30
13558 *
13559 * @since Release 20101201
13560 *
13561 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
13562 */
13563 public static NutationTerms jauNut80(double date1, double date2)
13564 {
13565 double t, el, elp, f, d, om, dp, de, arg, s, c;
13566 int j;
13567
13568 /* Units of 0.1 milliarcsecond to radians */
13569 final double U2R = DAS2R / 1e4;
13570
13571 /* ------------------------------------------------ */
13572 /* Table of multiples of arguments and coefficients */
13573 /* ------------------------------------------------ */
13574
13575 /* The units for the sine and cosine coefficients are 0.1 mas and */
13576 /* the same per Julian century */
13577
13578 final class NutationModel {
13579 final int nl,nlp,nf,nd,nom; /* coefficients of l,l',F,D,Om */
13580 final double sp,spt; /* longitude sine, 1 and t coefficients */
13581 final double ce,cet; /* obliquity cosine, 1 and t coefficients */
13582
13583 public NutationModel(int nl,int nlp,int nf,int nd,int nom,
13584 double sp,double spt,
13585 double ce,double cet ) {
13586 this.nl = nl;this.nlp = nlp;this.nf = nf;this.nd = nd;this.nom = nom;
13587 this.sp = sp;this.spt = spt;
13588 this.ce = ce;this.cet = cet;
13589 }
13590 }
13591 NutationModel x[] = {
13592
13593 /* 1-10 */
13594 new NutationModel( 0, 0, 0, 0, 1, -171996.0, -174.2, 92025.0, 8.9 ),
13595 new NutationModel( 0, 0, 0, 0, 2, 2062.0, 0.2, -895.0, 0.5 ),
13596 new NutationModel( -2, 0, 2, 0, 1, 46.0, 0.0, -24.0, 0.0 ),
13597 new NutationModel( 2, 0, -2, 0, 0, 11.0, 0.0, 0.0, 0.0 ),
13598 new NutationModel( -2, 0, 2, 0, 2, -3.0, 0.0, 1.0, 0.0 ),
13599 new NutationModel( 1, -1, 0, -1, 0, -3.0, 0.0, 0.0, 0.0 ),
13600 new NutationModel( 0, -2, 2, -2, 1, -2.0, 0.0, 1.0, 0.0 ),
13601 new NutationModel( 2, 0, -2, 0, 1, 1.0, 0.0, 0.0, 0.0 ),
13602 new NutationModel( 0, 0, 2, -2, 2, -13187.0, -1.6, 5736.0, -3.1 ),
13603 new NutationModel( 0, 1, 0, 0, 0, 1426.0, -3.4, 54.0, -0.1 ),
13604
13605 /* 11-20 */
13606 new NutationModel( 0, 1, 2, -2, 2, -517.0, 1.2, 224.0, -0.6 ),
13607 new NutationModel( 0, -1, 2, -2, 2, 217.0, -0.5, -95.0, 0.3 ),
13608 new NutationModel( 0, 0, 2, -2, 1, 129.0, 0.1, -70.0, 0.0 ),
13609 new NutationModel( 2, 0, 0, -2, 0, 48.0, 0.0, 1.0, 0.0 ),
13610 new NutationModel( 0, 0, 2, -2, 0, -22.0, 0.0, 0.0, 0.0 ),
13611 new NutationModel( 0, 2, 0, 0, 0, 17.0, -0.1, 0.0, 0.0 ),
13612 new NutationModel( 0, 1, 0, 0, 1, -15.0, 0.0, 9.0, 0.0 ),
13613 new NutationModel( 0, 2, 2, -2, 2, -16.0, 0.1, 7.0, 0.0 ),
13614 new NutationModel( 0, -1, 0, 0, 1, -12.0, 0.0, 6.0, 0.0 ),
13615 new NutationModel( -2, 0, 0, 2, 1, -6.0, 0.0, 3.0, 0.0 ),
13616
13617 /* 21-30 */
13618 new NutationModel( 0, -1, 2, -2, 1, -5.0, 0.0, 3.0, 0.0 ),
13619 new NutationModel( 2, 0, 0, -2, 1, 4.0, 0.0, -2.0, 0.0 ),
13620 new NutationModel( 0, 1, 2, -2, 1, 4.0, 0.0, -2.0, 0.0 ),
13621 new NutationModel( 1, 0, 0, -1, 0, -4.0, 0.0, 0.0, 0.0 ),
13622 new NutationModel( 2, 1, 0, -2, 0, 1.0, 0.0, 0.0, 0.0 ),
13623 new NutationModel( 0, 0, -2, 2, 1, 1.0, 0.0, 0.0, 0.0 ),
13624 new NutationModel( 0, 1, -2, 2, 0, -1.0, 0.0, 0.0, 0.0 ),
13625 new NutationModel( 0, 1, 0, 0, 2, 1.0, 0.0, 0.0, 0.0 ),
13626 new NutationModel( -1, 0, 0, 1, 1, 1.0, 0.0, 0.0, 0.0 ),
13627 new NutationModel( 0, 1, 2, -2, 0, -1.0, 0.0, 0.0, 0.0 ),
13628
13629 /* 31-40 */
13630 new NutationModel( 0, 0, 2, 0, 2, -2274.0, -0.2, 977.0, -0.5 ),
13631 new NutationModel( 1, 0, 0, 0, 0, 712.0, 0.1, -7.0, 0.0 ),
13632 new NutationModel( 0, 0, 2, 0, 1, -386.0, -0.4, 200.0, 0.0 ),
13633 new NutationModel( 1, 0, 2, 0, 2, -301.0, 0.0, 129.0, -0.1 ),
13634 new NutationModel( 1, 0, 0, -2, 0, -158.0, 0.0, -1.0, 0.0 ),
13635 new NutationModel( -1, 0, 2, 0, 2, 123.0, 0.0, -53.0, 0.0 ),
13636 new NutationModel( 0, 0, 0, 2, 0, 63.0, 0.0, -2.0, 0.0 ),
13637 new NutationModel( 1, 0, 0, 0, 1, 63.0, 0.1, -33.0, 0.0 ),
13638 new NutationModel( -1, 0, 0, 0, 1, -58.0, -0.1, 32.0, 0.0 ),
13639 new NutationModel( -1, 0, 2, 2, 2, -59.0, 0.0, 26.0, 0.0 ),
13640
13641 /* 41-50 */
13642 new NutationModel( 1, 0, 2, 0, 1, -51.0, 0.0, 27.0, 0.0 ),
13643 new NutationModel( 0, 0, 2, 2, 2, -38.0, 0.0, 16.0, 0.0 ),
13644 new NutationModel( 2, 0, 0, 0, 0, 29.0, 0.0, -1.0, 0.0 ),
13645 new NutationModel( 1, 0, 2, -2, 2, 29.0, 0.0, -12.0, 0.0 ),
13646 new NutationModel( 2, 0, 2, 0, 2, -31.0, 0.0, 13.0, 0.0 ),
13647 new NutationModel( 0, 0, 2, 0, 0, 26.0, 0.0, -1.0, 0.0 ),
13648 new NutationModel( -1, 0, 2, 0, 1, 21.0, 0.0, -10.0, 0.0 ),
13649 new NutationModel( -1, 0, 0, 2, 1, 16.0, 0.0, -8.0, 0.0 ),
13650 new NutationModel( 1, 0, 0, -2, 1, -13.0, 0.0, 7.0, 0.0 ),
13651 new NutationModel( -1, 0, 2, 2, 1, -10.0, 0.0, 5.0, 0.0 ),
13652
13653 /* 51-60 */
13654 new NutationModel( 1, 1, 0, -2, 0, -7.0, 0.0, 0.0, 0.0 ),
13655 new NutationModel( 0, 1, 2, 0, 2, 7.0, 0.0, -3.0, 0.0 ),
13656 new NutationModel( 0, -1, 2, 0, 2, -7.0, 0.0, 3.0, 0.0 ),
13657 new NutationModel( 1, 0, 2, 2, 2, -8.0, 0.0, 3.0, 0.0 ),
13658 new NutationModel( 1, 0, 0, 2, 0, 6.0, 0.0, 0.0, 0.0 ),
13659 new NutationModel( 2, 0, 2, -2, 2, 6.0, 0.0, -3.0, 0.0 ),
13660 new NutationModel( 0, 0, 0, 2, 1, -6.0, 0.0, 3.0, 0.0 ),
13661 new NutationModel( 0, 0, 2, 2, 1, -7.0, 0.0, 3.0, 0.0 ),
13662 new NutationModel( 1, 0, 2, -2, 1, 6.0, 0.0, -3.0, 0.0 ),
13663 new NutationModel( 0, 0, 0, -2, 1, -5.0, 0.0, 3.0, 0.0 ),
13664
13665 /* 61-70 */
13666 new NutationModel( 1, -1, 0, 0, 0, 5.0, 0.0, 0.0, 0.0 ),
13667 new NutationModel( 2, 0, 2, 0, 1, -5.0, 0.0, 3.0, 0.0 ),
13668 new NutationModel( 0, 1, 0, -2, 0, -4.0, 0.0, 0.0, 0.0 ),
13669 new NutationModel( 1, 0, -2, 0, 0, 4.0, 0.0, 0.0, 0.0 ),
13670 new NutationModel( 0, 0, 0, 1, 0, -4.0, 0.0, 0.0, 0.0 ),
13671 new NutationModel( 1, 1, 0, 0, 0, -3.0, 0.0, 0.0, 0.0 ),
13672 new NutationModel( 1, 0, 2, 0, 0, 3.0, 0.0, 0.0, 0.0 ),
13673 new NutationModel( 1, -1, 2, 0, 2, -3.0, 0.0, 1.0, 0.0 ),
13674 new NutationModel( -1, -1, 2, 2, 2, -3.0, 0.0, 1.0, 0.0 ),
13675 new NutationModel( -2, 0, 0, 0, 1, -2.0, 0.0, 1.0, 0.0 ),
13676
13677 /* 71-80 */
13678 new NutationModel( 3, 0, 2, 0, 2, -3.0, 0.0, 1.0, 0.0 ),
13679 new NutationModel( 0, -1, 2, 2, 2, -3.0, 0.0, 1.0, 0.0 ),
13680 new NutationModel( 1, 1, 2, 0, 2, 2.0, 0.0, -1.0, 0.0 ),
13681 new NutationModel( -1, 0, 2, -2, 1, -2.0, 0.0, 1.0, 0.0 ),
13682 new NutationModel( 2, 0, 0, 0, 1, 2.0, 0.0, -1.0, 0.0 ),
13683 new NutationModel( 1, 0, 0, 0, 2, -2.0, 0.0, 1.0, 0.0 ),
13684 new NutationModel( 3, 0, 0, 0, 0, 2.0, 0.0, 0.0, 0.0 ),
13685 new NutationModel( 0, 0, 2, 1, 2, 2.0, 0.0, -1.0, 0.0 ),
13686 new NutationModel( -1, 0, 0, 0, 2, 1.0, 0.0, -1.0, 0.0 ),
13687 new NutationModel( 1, 0, 0, -4, 0, -1.0, 0.0, 0.0, 0.0 ),
13688
13689 /* 81-90 */
13690 new NutationModel( -2, 0, 2, 2, 2, 1.0, 0.0, -1.0, 0.0 ),
13691 new NutationModel( -1, 0, 2, 4, 2, -2.0, 0.0, 1.0, 0.0 ),
13692 new NutationModel( 2, 0, 0, -4, 0, -1.0, 0.0, 0.0, 0.0 ),
13693 new NutationModel( 1, 1, 2, -2, 2, 1.0, 0.0, -1.0, 0.0 ),
13694 new NutationModel( 1, 0, 2, 2, 1, -1.0, 0.0, 1.0, 0.0 ),
13695 new NutationModel( -2, 0, 2, 4, 2, -1.0, 0.0, 1.0, 0.0 ),
13696 new NutationModel( -1, 0, 4, 0, 2, 1.0, 0.0, 0.0, 0.0 ),
13697 new NutationModel( 1, -1, 0, -2, 0, 1.0, 0.0, 0.0, 0.0 ),
13698 new NutationModel( 2, 0, 2, -2, 1, 1.0, 0.0, -1.0, 0.0 ),
13699 new NutationModel( 2, 0, 2, 2, 2, -1.0, 0.0, 0.0, 0.0 ),
13700
13701 /* 91-100 */
13702 new NutationModel( 1, 0, 0, 2, 1, -1.0, 0.0, 0.0, 0.0 ),
13703 new NutationModel( 0, 0, 4, -2, 2, 1.0, 0.0, 0.0, 0.0 ),
13704 new NutationModel( 3, 0, 2, -2, 2, 1.0, 0.0, 0.0, 0.0 ),
13705 new NutationModel( 1, 0, 2, -2, 0, -1.0, 0.0, 0.0, 0.0 ),
13706 new NutationModel( 0, 1, 2, 0, 1, 1.0, 0.0, 0.0, 0.0 ),
13707 new NutationModel( -1, -1, 0, 2, 1, 1.0, 0.0, 0.0, 0.0 ),
13708 new NutationModel( 0, 0, -2, 0, 1, -1.0, 0.0, 0.0, 0.0 ),
13709 new NutationModel( 0, 0, 2, -1, 2, -1.0, 0.0, 0.0, 0.0 ),
13710 new NutationModel( 0, 1, 0, 2, 0, -1.0, 0.0, 0.0, 0.0 ),
13711 new NutationModel( 1, 0, -2, -2, 0, -1.0, 0.0, 0.0, 0.0 ),
13712
13713 /* 101-106 */
13714 new NutationModel( 0, -1, 2, 0, 1, -1.0, 0.0, 0.0, 0.0 ),
13715 new NutationModel( 1, 1, 0, -2, 1, -1.0, 0.0, 0.0, 0.0 ),
13716 new NutationModel( 1, 0, -2, 2, 0, -1.0, 0.0, 0.0, 0.0 ),
13717 new NutationModel( 2, 0, 0, 2, 0, 1.0, 0.0, 0.0, 0.0 ),
13718 new NutationModel( 0, 0, 2, 4, 2, -1.0, 0.0, 0.0, 0.0 ),
13719 new NutationModel( 0, 1, 0, 1, 0, 1.0, 0.0, 0.0, 0.0 )
13720 };
13721
13722 /* Number of terms in the series */
13723 final int NT = x.length;
13724
13725 /*--------------------------------------------------------------------*/
13726
13727 /* Interval between fundamental epoch J2000.0 and given date (JC). */
13728 t = ((date1 - DJ00) + date2) / DJC;
13729
13730 /* --------------------- */
13731 /* Fundamental arguments */
13732 /* --------------------- */
13733
13734 /* Mean longitude of Moon minus mean longitude of Moon's perigee. */
13735 el = jauAnpm(
13736 (485866.733 + (715922.633 + (31.310 + 0.064 * t) * t) * t)
13737 * DAS2R + fmod(1325.0 * t, 1.0) * D2PI);
13738
13739 /* Mean longitude of Sun minus mean longitude of Sun's perigee. */
13740 elp = jauAnpm(
13741 (1287099.804 + (1292581.224 + (-0.577 - 0.012 * t) * t) * t)
13742 * DAS2R + fmod(99.0 * t, 1.0) * D2PI);
13743
13744 /* Mean longitude of Moon minus mean longitude of Moon's node. */
13745 f = jauAnpm(
13746 (335778.877 + (295263.137 + (-13.257 + 0.011 * t) * t) * t)
13747 * DAS2R + fmod(1342.0 * t, 1.0) * D2PI);
13748
13749 /* Mean elongation of Moon from Sun. */
13750 d = jauAnpm(
13751 (1072261.307 + (1105601.328 + (-6.891 + 0.019 * t) * t) * t)
13752 * DAS2R + fmod(1236.0 * t, 1.0) * D2PI);
13753
13754 /* Longitude of the mean ascending node of the lunar orbit on the */
13755 /* ecliptic, measured from the mean equinox of date. */
13756 om = jauAnpm(
13757 (450160.280 + (-482890.539 + (7.455 + 0.008 * t) * t) * t)
13758 * DAS2R + fmod(-5.0 * t, 1.0) * D2PI);
13759
13760 /* --------------- */
13761 /* Nutation series */
13762 /* --------------- */
13763
13764 /* Initialize nutation components. */
13765 dp = 0.0;
13766 de = 0.0;
13767
13768 /* Sum the nutation terms, ending with the biggest. */
13769 for (j = NT-1; j >= 0; j--) {
13770
13771 /* Form argument for current term. */
13772 arg = (double)x[j].nl * el
13773 + (double)x[j].nlp * elp
13774 + (double)x[j].nf * f
13775 + (double)x[j].nd * d
13776 + (double)x[j].nom * om;
13777
13778 /* Accumulate current nutation term. */
13779 s = x[j].sp + x[j].spt * t;
13780 c = x[j].ce + x[j].cet * t;
13781 if (s != 0.0) dp += s * sin(arg);
13782 if (c != 0.0) de += c * cos(arg);
13783 }
13784
13785 /* Convert results from 0.1 mas units to radians. */
13786 return new NutationTerms( dp * U2R,
13787 de * U2R);
13788
13789 }
13790
13791
13792 /**
13793 * Form the matrix of nutation for a given date, IAU 1980 model.
13794 *
13795 *<p>This function is derived from the International Astronomical Union's
13796 * SOFA (Standards Of Fundamental Astronomy) software collection.
13797 *
13798 *<p>Status: support function.
13799 *
13800 *<!-- Given: -->
13801 * @param date1 double TDB date (Note 1)
13802 * @param date2 double TDB date (Note 1)
13803 *
13804 *<!-- Returned: -->
13805 * @return double[3][3] nutation matrix
13806 *
13807 * <p>Notes:
13808 * <ol>
13809 *
13810 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
13811 * convenient way between the two arguments. For example,
13812 * JD(TT)=2450123.7 could be expressed in any of these ways,
13813 * among others:
13814 *<pre>
13815 * date1 date2
13816 *
13817 * 2450123.7 0.0 (JD method)
13818 * 2451545.0 -1421.3 (J2000 method)
13819 * 2400000.5 50123.2 (MJD method)
13820 * 2450123.5 0.2 (date & time method)
13821 *</pre>
13822 * The JD method is the most natural and convenient to use in
13823 * cases where the loss of several decimal digits of resolution
13824 * is acceptable. The J2000 method is best matched to the way
13825 * the argument is handled internally and will deliver the
13826 * optimum resolution. The MJD method and the date & time methods
13827 * are both good compromises between resolution and convenience.
13828 *
13829 * <li> The matrix operates in the sense V(true) = rmatn * V(mean),
13830 * where the p-vector V(true) is with respect to the true
13831 * equatorial triad of date and the p-vector V(mean) is with
13832 * respect to the mean equatorial triad of date.
13833 *</ol>
13834 *<p>Called:<ul>
13835 * <li>{@link #jauNut80} nutation, IAU 1980
13836 * <li>{@link #jauObl80} mean obliquity, IAU 1980
13837 * <li>{@link #jauNumat} form nutation matrix
13838 * </ul>
13839 *@version 2008 May 12
13840 *
13841 * @since Release 20101201
13842 *
13843 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
13844 */
13845 public static double[][] jauNutm80(double date1, double date2)
13846 {
13847 double rmatn[][];
13848 /* Nutation components and mean obliquity. */
13849 NutationTerms nt = jauNut80(date1, date2);
13850 double epsa = jauObl80(date1, date2);
13851
13852 /* Build the rotation matrix. */
13853 rmatn = jauNumat(epsa, nt.dpsi, nt.deps);
13854
13855 return rmatn;
13856
13857 }
13858
13859
13860 /**
13861 * Mean obliquity of the ecliptic, IAU 2006 precession model.
13862 *
13863 *<p>This function is derived from the International Astronomical Union's
13864 * SOFA (Standards Of Fundamental Astronomy) software collection.
13865 *
13866 *<p>Status: canonical model.
13867 *
13868 *<!-- Given: -->
13869 * @param date1 double TT as a 2-part Julian Date (Note 1)
13870 * @param date2 double TT as a 2-part Julian Date (Note 1)
13871 *
13872 * <!-- Returned (function value): -->
13873 * @return double obliquity of the ecliptic (radians, Note 2)
13874 *
13875 * <p>Notes:
13876 * <ol>
13877 *
13878 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
13879 * convenient way between the two arguments. For example,
13880 * JD(TT)=2450123.7 could be expressed in any of these ways,
13881 * among others:
13882 *<pre>
13883 * date1 date2
13884 *
13885 * 2450123.7 0.0 (JD method)
13886 * 2451545.0 -1421.3 (J2000 method)
13887 * 2400000.5 50123.2 (MJD method)
13888 * 2450123.5 0.2 (date & time method)
13889 *</pre>
13890 * The JD method is the most natural and convenient to use in
13891 * cases where the loss of several decimal digits of resolution
13892 * is acceptable. The J2000 method is best matched to the way
13893 * the argument is handled internally and will deliver the
13894 * optimum resolution. The MJD method and the date & time methods
13895 * are both good compromises between resolution and convenience.
13896 *
13897 * <li> The result is the angle between the ecliptic and mean equator of
13898 * date date1+date2.
13899 *</ol>
13900 *<p>Reference:
13901 *
13902 * Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351
13903 *
13904 *@version 2009 March 16
13905 *
13906 * @since Release 20101201
13907 *
13908 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
13909 */
13910 public static double jauObl06(double date1, double date2)
13911 {
13912 double t, eps0;
13913
13914
13915 /* Interval between fundamental date J2000.0 and given date (JC). */
13916 t = ((date1 - DJ00) + date2) / DJC;
13917
13918 /* Mean obliquity. */
13919 eps0 = (84381.406 +
13920 (-46.836769 +
13921 ( -0.0001831 +
13922 ( 0.00200340 +
13923 ( -0.000000576 +
13924 ( -0.0000000434) * t) * t) * t) * t) * t) * DAS2R;
13925
13926 return eps0;
13927
13928 }
13929
13930
13931 /**
13932 * Mean obliquity of the ecliptic, IAU 1980 model.
13933 *
13934 *<p>This function is derived from the International Astronomical Union's
13935 * SOFA (Standards Of Fundamental Astronomy) software collection.
13936 *
13937 *<p>Status: canonical model.
13938 *
13939 *<!-- Given: -->
13940 * @param date1 double TT as a 2-part Julian Date (Note 1)
13941 * @param date2 double TT as a 2-part Julian Date (Note 1)
13942 *
13943 * <!-- Returned (function value): -->
13944 * @return double obliquity of the ecliptic (radians, Note 2)
13945 *
13946 * <p>Notes:
13947 * <ol>
13948 *
13949 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
13950 * convenient way between the two arguments. For example,
13951 * JD(TT)=2450123.7 could be expressed in any of these ways,
13952 * among others:
13953 *<pre>
13954 * date1 date2
13955 *
13956 * 2450123.7 0.0 (JD method)
13957 * 2451545.0 -1421.3 (J2000 method)
13958 * 2400000.5 50123.2 (MJD method)
13959 * 2450123.5 0.2 (date & time method)
13960 *</pre>
13961 * The JD method is the most natural and convenient to use in
13962 * cases where the loss of several decimal digits of resolution
13963 * is acceptable. The J2000 method is best matched to the way
13964 * the argument is handled internally and will deliver the
13965 * optimum resolution. The MJD method and the date & time methods
13966 * are both good compromises between resolution and convenience.
13967 *
13968 * <li> The result is the angle between the ecliptic and mean equator of
13969 * date date1+date2.
13970 *</ol>
13971 *<p>Reference:
13972 *
13973 * <p>Explanatory Supplement to the Astronomical Almanac,
13974 * P. Kenneth Seidelmann (ed), University Science Books (1992),
13975 * Expression 3.222-1 (p114).
13976 *
13977 *@version 2009 March 16
13978 *
13979 * @since Release 20101201
13980 *
13981 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
13982 */
13983 public static double jauObl80(double date1, double date2)
13984 {
13985 double t, eps0;
13986
13987
13988 /* Interval between fundamental epoch J2000.0 and given date (JC). */
13989 t = ((date1 - DJ00) + date2) / DJC;
13990
13991 /* Mean obliquity of date. */
13992 eps0 = DAS2R * (84381.448 +
13993 (-46.8150 +
13994 (-0.00059 +
13995 ( 0.001813) * t) * t) * t);
13996
13997 return eps0;
13998
13999 }
14000
14001
14002 /**
14003 * equinox based precession angles.
14004 * .
14005 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 21 Nov 2011
14006 * @version $Revision$ $date$
14007 */
14008 public static class PrecessionAngles {
14009 /** epsilon_0 obliquity at J2000.0. */
14010 public double eps0;
14011 /** psi_A luni-solar precession. */
14012 public double psia;
14013 /** omega_A inclination of equator wrt J2000.0 ecliptic. */
14014 public double oma;
14015 /** P_A ecliptic pole x, J2000.0 ecliptic triad. */
14016 public double bpa;
14017 /** Q_A ecliptic pole -y, J2000.0 ecliptic triad. */
14018 public double bqa;
14019 /** pi_A angle between moving and J2000.0 ecliptics. */
14020 public double pia;
14021 /** Pi_A longitude of ascending node of the ecliptic. */
14022 public double bpia;
14023 /** epsilon_A obliquity of the ecliptic. */
14024 public double epsa;
14025 /** chi_A planetary precession. */
14026 public double chia;
14027 /** z_A equatorial precession: -3rd 323 Euler angle. */
14028 public double za;
14029 /** zeta_A equatorial precession: -1st 323 Euler angle. */
14030 public double zetaa;
14031 /** theta_A equatorial precession: 2nd 323 Euler angle. */
14032 public double thetaa;
14033 /** p_A general precession. */
14034 public double pa;
14035 /** gamma_J2000 J2000.0 RA difference of ecliptic poles. */
14036 public double gam;
14037 /** phi_J2000 J2000.0 codeclination of ecliptic pole. */
14038 public double phi;
14039 /** psi_J2000 longitude difference of equator poles, J2000.0. */
14040 public double psi;
14041
14042 public PrecessionAngles ( double eps0, double psia, double oma, double bpa,
14043 double bqa, double pia, double bpia,
14044 double epsa, double chia, double za, double zetaa,
14045 double thetaa, double pa,
14046 double gam, double phi, double psi){
14047
14048 this.eps0 = eps0;
14049 this.psia = psia;
14050 this.oma = oma;
14051 this.bpa = bpa;
14052 this.bqa = bqa;
14053 this.pia = pia;
14054 this.bpia = bpia;
14055 this.epsa = epsa;
14056 this.chia = chia;
14057 this.za = za;
14058 this.zetaa = zetaa;
14059 this.thetaa = thetaa;
14060 this.pa = pa;
14061 this.gam = gam;
14062 this.phi = phi;
14063 this.psi = psi;
14064 }
14065 }
14066 /**
14067 * Precession angles, IAU 2006, equinox based.
14068 *
14069 *<p>This function is derived from the International Astronomical Union's
14070 * SOFA (Standards Of Fundamental Astronomy) software collection.
14071 *
14072 *<p>Status: canonical models.
14073 *
14074 *<!-- Given: -->
14075 * @param date1 double TT as a 2-part Julian Date (Note 1)
14076 * @param date2 double TT as a 2-part Julian Date (Note 1)
14077 *
14078 * Returned (see Note 2):
14079 * eps0 double epsilon_0
14080 * psia double psi_A
14081 * oma double omega_A
14082 * bpa double P_A
14083 * bqa double Q_A
14084 * pia double pi_A
14085 * bpia double Pi_A
14086 * epsa double obliquity epsilon_A
14087 * chia double chi_A
14088 * za double z_A
14089 * zetaa double zeta_A
14090 * thetaa double theta_A
14091 * pa double p_A
14092 * gam double F-W angle gamma_J2000
14093 * phi double F-W angle phi_J2000
14094 * psi double F-W angle psi_J2000
14095 *
14096 * <p>Notes:
14097 * <ol>
14098 *
14099 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
14100 * convenient way between the two arguments. For example,
14101 * JD(TT)=2450123.7 could be expressed in any of these ways,
14102 * among others:
14103 *<pre>
14104 * date1 date2
14105 *
14106 * 2450123.7 0.0 (JD method)
14107 * 2451545.0 -1421.3 (J2000 method)
14108 * 2400000.5 50123.2 (MJD method)
14109 * 2450123.5 0.2 (date & time method)
14110 *</pre>
14111 * The JD method is the most natural and convenient to use in
14112 * cases where the loss of several decimal digits of resolution
14113 * is acceptable. The J2000 method is best matched to the way
14114 * the argument is handled internally and will deliver the
14115 * optimum resolution. The MJD method and the date & time methods
14116 * are both good compromises between resolution and convenience.
14117 *
14118 * <li> This function returns the set of equinox based angles for the
14119 * Capitaine et al. "P03" precession theory, adopted by the IAU in
14120 * 2006. The angles are set out in Table 1 of Hilton et al. (2006):
14121 *
14122 * eps0 epsilon_0 obliquity at J2000.0
14123 * psia psi_A luni-solar precession
14124 * oma omega_A inclination of equator wrt J2000.0 ecliptic
14125 * bpa P_A ecliptic pole x, J2000.0 ecliptic triad
14126 * bqa Q_A ecliptic pole -y, J2000.0 ecliptic triad
14127 * pia pi_A angle between moving and J2000.0 ecliptics
14128 * bpia Pi_A longitude of ascending node of the ecliptic
14129 * epsa epsilon_A obliquity of the ecliptic
14130 * chia chi_A planetary precession
14131 * za z_A equatorial precession: -3rd 323 Euler angle
14132 * zetaa zeta_A equatorial precession: -1st 323 Euler angle
14133 * thetaa theta_A equatorial precession: 2nd 323 Euler angle
14134 * pa p_A general precession
14135 * gam gamma_J2000 J2000.0 RA difference of ecliptic poles
14136 * phi phi_J2000 J2000.0 codeclination of ecliptic pole
14137 * psi psi_J2000 longitude difference of equator poles, J2000.0
14138 *
14139 * The returned values are all radians.
14140 *
14141 * <li> Hilton et al. (2006) Table 1 also contains angles that depend on
14142 * models distinct from the P03 precession theory itself, namely the
14143 * IAU 2000A frame bias and nutation. The quoted polynomials are
14144 * used in other JSOFA functions:
14145 *
14146 * . jauXy06 contains the polynomial parts of the X and Y series.
14147 *
14148 * . jauS06 contains the polynomial part of the s+XY/2 series.
14149 *
14150 * . jauPfw06 implements the series for the Fukushima-Williams
14151 * angles that are with respect to the GCRS pole (i.e. the variants
14152 * that include frame bias).
14153 *
14154 * <li> The IAU resolution stipulated that the choice of parameterization
14155 * was left to the user, and so an IAU compliant precession
14156 * implementation can be constructed using various combinations of
14157 * the angles returned by the present function.
14158 *
14159 * <li> The parameterization used by JSOFA is the Fukushima-Williams angles
14160 * referred directly to the GCRS pole. These are the final four
14161 * arguments returned by the present function, but are more
14162 * efficiently calculated by calling the function jauPfw06. JSOFA
14163 * also supports the direct computation of the CIP GCRS X,Y by
14164 * series, available by calling jauXy06.
14165 *
14166 * <li> The agreement between the different parameterizations is at the
14167 * 1 microarcsecond level in the present era.
14168 *
14169 * <li> When constructing a precession formulation that refers to the GCRS
14170 * pole rather than the dynamical pole, it may (depending on the
14171 * choice of angles) be necessary to introduce the frame bias
14172 * explicitly.
14173 *
14174 * <li> It is permissible to re-use the same variable in the returned
14175 * arguments. The quantities are stored in the stated order.
14176 *</ol>
14177 *<p>Reference:
14178 *
14179 * Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351
14180 *
14181 *<p>Called:<ul>
14182 * <li>{@link #jauObl06} mean obliquity, IAU 2006
14183 * </ul>
14184 *@version 2009 December 17
14185 *
14186 * @since Release 20101201
14187 *
14188 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
14189 */
14190 public static PrecessionAngles jauP06e(double date1, double date2)
14191 {
14192 double t;
14193 double eps0, psia, oma, bpa,
14194 bqa, pia, bpia,
14195 epsa, chia, za, zetaa,
14196 thetaa, pa,
14197 gam, phi, psi;
14198
14199 /* Interval between fundamental date J2000.0 and given date (JC). */
14200 t = ((date1 - DJ00) + date2) / DJC;
14201
14202 /* Obliquity at J2000.0. */
14203
14204 eps0 = 84381.406 * DAS2R;
14205
14206 /* Luni-solar precession. */
14207
14208 psia = ( 5038.481507 +
14209 ( -1.0790069 +
14210 ( -0.00114045 +
14211 ( 0.000132851 +
14212 ( -0.0000000951 )
14213 * t) * t) * t) * t) * t * DAS2R;
14214
14215 /* Inclination of mean equator with respect to the J2000.0 ecliptic. */
14216
14217 oma = eps0 + ( -0.025754 +
14218 ( 0.0512623 +
14219 ( -0.00772503 +
14220 ( -0.000000467 +
14221 ( 0.0000003337 )
14222 * t) * t) * t) * t) * t * DAS2R;
14223
14224 /* Ecliptic pole x, J2000.0 ecliptic triad. */
14225
14226 bpa = ( 4.199094 +
14227 ( 0.1939873 +
14228 ( -0.00022466 +
14229 ( -0.000000912 +
14230 ( 0.0000000120 )
14231 * t) * t) * t) * t) * t * DAS2R;
14232
14233 /* Ecliptic pole -y, J2000.0 ecliptic triad. */
14234
14235 bqa = ( -46.811015 +
14236 ( 0.0510283 +
14237 ( 0.00052413 +
14238 ( -0.000000646 +
14239 ( -0.0000000172 )
14240 * t) * t) * t) * t) * t * DAS2R;
14241
14242 /* Angle between moving and J2000.0 ecliptics. */
14243
14244 pia = ( 46.998973 +
14245 ( -0.0334926 +
14246 ( -0.00012559 +
14247 ( 0.000000113 +
14248 ( -0.0000000022 )
14249 * t) * t) * t) * t) * t * DAS2R;
14250
14251 /* Longitude of ascending node of the moving ecliptic. */
14252
14253 bpia = ( 629546.7936 +
14254 ( -867.95758 +
14255 ( 0.157992 +
14256 ( -0.0005371 +
14257 ( -0.00004797 +
14258 ( 0.000000072 )
14259 * t) * t) * t) * t) * t) * DAS2R;
14260
14261 /* Mean obliquity of the ecliptic. */
14262
14263 epsa = jauObl06(date1, date2);
14264
14265 /* Planetary precession. */
14266
14267 chia = ( 10.556403 +
14268 ( -2.3814292 +
14269 ( -0.00121197 +
14270 ( 0.000170663 +
14271 ( -0.0000000560 )
14272 * t) * t) * t) * t) * t * DAS2R;
14273
14274 /* Equatorial precession: minus the third of the 323 Euler angles. */
14275
14276 za = ( -2.650545 +
14277 ( 2306.077181 +
14278 ( 1.0927348 +
14279 ( 0.01826837 +
14280 ( -0.000028596 +
14281 ( -0.0000002904 )
14282 * t) * t) * t) * t) * t) * DAS2R;
14283
14284 /* Equatorial precession: minus the first of the 323 Euler angles. */
14285
14286 zetaa = ( 2.650545 +
14287 ( 2306.083227 +
14288 ( 0.2988499 +
14289 ( 0.01801828 +
14290 ( -0.000005971 +
14291 ( -0.0000003173 )
14292 * t) * t) * t) * t) * t) * DAS2R;
14293
14294 /* Equatorial precession: second of the 323 Euler angles. */
14295
14296 thetaa = ( 2004.191903 +
14297 ( -0.4294934 +
14298 ( -0.04182264 +
14299 ( -0.000007089 +
14300 ( -0.0000001274 )
14301 * t) * t) * t) * t) * t * DAS2R;
14302
14303 /* General precession. */
14304
14305 pa = ( 5028.796195 +
14306 ( 1.1054348 +
14307 ( 0.00007964 +
14308 ( -0.000023857 +
14309 ( 0.0000000383 )
14310 * t) * t) * t) * t) * t * DAS2R;
14311
14312 /* Fukushima-Williams angles for precession. */
14313
14314 gam = ( 10.556403 +
14315 ( 0.4932044 +
14316 ( -0.00031238 +
14317 ( -0.000002788 +
14318 ( 0.0000000260 )
14319 * t) * t) * t) * t) * t * DAS2R;
14320
14321 phi = eps0 + ( -46.811015 +
14322 ( 0.0511269 +
14323 ( 0.00053289 +
14324 ( -0.000000440 +
14325 ( -0.0000000176 )
14326 * t) * t) * t) * t) * t * DAS2R;
14327
14328 psi = ( 5038.481507 +
14329 ( 1.5584176 +
14330 ( -0.00018522 +
14331 ( -0.000026452 +
14332 ( -0.0000000148 )
14333 * t) * t) * t) * t) * t * DAS2R;
14334
14335 return new PrecessionAngles(eps0, psia, oma, bpa, bqa, pia, bpia, epsa, chia, za, zetaa, thetaa, pa, gam, phi, psi);
14336
14337 }
14338
14339
14340 /**
14341 * Extend a p-vector to a pv-vector by appending a zero velocity.
14342 *
14343 *<p>This function is derived from the International Astronomical Union's
14344 * SOFA (Standards Of Fundamental Astronomy) software collection.
14345 *
14346 *<p>Status: vector/matrix support function.
14347 *
14348 *<!-- Given: -->
14349 * @param p double[3] p-vector
14350 *
14351 *<!-- Returned: -->
14352 * @return pv double[2][3] <u>returned</u> pv-vector
14353 *
14354 *<p>Called:<ul>
14355 * <li>{@link #jauCp} copy p-vector
14356 * <li>{@link #jauZp} zero p-vector
14357 * </ul>
14358 *@version 2008 May 11
14359 *
14360 * @since Release 20101201
14361 *
14362 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
14363 */
14364 public static double[][] jauP2pv(double p[] )
14365 {
14366 double pv[][] = new double[3][3];
14367 jauCp(p, pv[0]);
14368 jauZp(pv[1]);
14369
14370 return pv;
14371
14372 }
14373
14374 /**
14375 * A position expressed in spherical polar coordinates.
14376 * .
14377 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 21 Nov 2011
14378 * @version $Revision$ $date$
14379 */
14380 public static class SphericalPosition {
14381 /** longitude angle (radians) */
14382 public double theta;
14383 /** latitude angle (radians) */
14384 public double phi;
14385 /** radial distance */
14386 public double r;
14387 public SphericalPosition(double theta, double phi, double r) {
14388 this.theta = theta;
14389 this.phi = phi;
14390 this.r = r;
14391 }
14392 }
14393
14394 /**
14395 * P-vector to spherical polar coordinates.
14396 *
14397 *<p>This function is derived from the International Astronomical Union's
14398 * SOFA (Standards Of Fundamental Astronomy) software collection.
14399 *
14400 *<p>Status: vector/matrix support function.
14401 *
14402 *<!-- Given: -->
14403 * @param p double[3] p-vector
14404 *
14405 *<!-- Returned: -->
14406 * @return theta double <u>returned</u> longitude angle (radians)
14407 * phi double <u>returned</u> latitude angle (radians)
14408 * r double <u>returned</u> radial distance
14409 *
14410 * <p>Notes:
14411 * <ol>
14412 *
14413 * <li> If P is null, zero theta, phi and r are returned.
14414 *
14415 * <li> At either pole, zero theta is returned.
14416 *</ol>
14417 *<p>Called:<ul>
14418 * <li>{@link #jauC2s} p-vector to spherical
14419 * <li>{@link #jauPm} modulus of p-vector
14420 * </ul>
14421 *@version 2008 May 22
14422 *
14423 * @since Release 20101201
14424 *
14425 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
14426 */
14427 public static SphericalPosition jauP2s(double p[])
14428 {
14429 SphericalCoordinate sc = jauC2s(p);
14430 double r = jauPm(p);
14431
14432 return new SphericalPosition(sc.alpha, sc.delta, r);
14433
14434 }
14435
14436
14437 /**
14438 * Position-angle from two p-vectors.
14439 *
14440 *<p>This function is derived from the International Astronomical Union's
14441 * SOFA (Standards Of Fundamental Astronomy) software collection.
14442 *
14443 *<p>Status: vector/matrix support function.
14444 *
14445 *<!-- Given: -->
14446 * @param a double[3] direction of reference point
14447 * @param b double[3] direction of point whose PA is required
14448 *
14449 * <!-- Returned (function value): -->
14450 * @return double position angle of b with respect to a (radians)
14451 *
14452 * <p>Notes:
14453 * <ol>
14454 *
14455 * <li> The result is the position angle, in radians, of direction b with
14456 * respect to direction a. It is in the range -pi to +pi. The
14457 * sense is such that if b is a small distance "north" of a the
14458 * position angle is approximately zero, and if b is a small
14459 * distance "east" of a the position angle is approximately +pi/2.
14460 *
14461 * <li> The vectors a and b need not be of unit length.
14462 *
14463 * <li> Zero is returned if the two directions are the same or if either
14464 * vector is null.
14465 *
14466 * <li> If vector a is at a pole, the result is ill-defined.
14467 *</ol>
14468 *<p>Called:<ul>
14469 * <li>{@link #jauPn} decompose p-vector into modulus and direction
14470 * <li>{@link #jauPm} modulus of p-vector
14471 * <li>{@link #jauPxp} vector product of two p-vectors
14472 * <li>{@link #jauPmp} p-vector minus p-vector
14473 * <li>{@link #jauPdp} scalar product of two p-vectors
14474 * </ul>
14475 *@version 2008 May 25
14476 *
14477 * @since Release 20101201
14478 *
14479 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
14480 */
14481 public static double jauPap(double a[] , double b[] )
14482 {
14483 double am, au[] = new double[3], bm, st, ct, xa, ya, za, eta[] = new double[3], xi[] = new double[3], a2b[] = new double[3], pa;
14484
14485
14486 /* Modulus and direction of the a vector. */
14487 NormalizedVector nv = jauPn(a );
14488 am = nv.r; au = nv.u;
14489 /* Modulus of the b vector. */
14490 bm = jauPm(b);
14491
14492 /* Deal with the case of a null vector. */
14493 if ((am == 0.0) || (bm == 0.0)) {
14494 st = 0.0;
14495 ct = 1.0;
14496 } else {
14497
14498 /* The "north" axis tangential from a (arbitrary length). */
14499 xa = a[0];
14500 ya = a[1];
14501 za = a[2];
14502 eta[0] = -xa * za;
14503 eta[1] = -ya * za;
14504 eta[2] = xa*xa + ya*ya;
14505
14506 /* The "east" axis tangential from a (same length). */
14507 xi = jauPxp(eta,au);
14508
14509 /* The vector from a to b. */
14510 a2b = jauPmp(b, a);
14511
14512 /* Resolve into components along the north and east axes. */
14513 st = jauPdp(a2b, xi);
14514 ct = jauPdp(a2b, eta);
14515
14516 /* Deal with degenerate cases. */
14517 if ((st == 0.0) && (ct == 0.0)) ct = 1.0;
14518 }
14519
14520 /* Position angle. */
14521 pa = atan2(st, ct);
14522
14523 return pa;
14524
14525 }
14526
14527
14528 /**
14529 * Position-angle from spherical coordinates.
14530 *
14531 *<p>This function is derived from the International Astronomical Union's
14532 * SOFA (Standards Of Fundamental Astronomy) software collection.
14533 *
14534 *<p>Status: vector/matrix support function.
14535 *
14536 *<!-- Given: -->
14537 * @param al double longitude of point A (e.g. RA) in radians
14538 * @param ap double latitude of point A (e.g. Dec) in radians
14539 * @param bl double longitude of point B
14540 * @param bp double latitude of point B
14541 *
14542 * <!-- Returned (function value): -->
14543 * @return double position angle of B with respect to A
14544 *
14545 * <p>Notes:
14546 * <ol>
14547 *
14548 * <li> The result is the bearing (position angle), in radians, of point
14549 * B with respect to point A. It is in the range -pi to +pi. The
14550 * sense is such that if B is a small distance "east" of point A,
14551 * the bearing is approximately +pi/2.
14552 *
14553 * <li> Zero is returned if the two points are coincident.
14554 *</ol>
14555 *@version 2008 May 22
14556 *
14557 * @since Release 20101201
14558 *
14559 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
14560 */
14561 public static double jauPas(double al, double ap, double bl, double bp)
14562 {
14563 double dl, x, y, pa;
14564
14565
14566 dl = bl - al;
14567 y = sin(dl) * cos(bp);
14568 x = sin(bp) * cos(ap) - cos(bp) * sin(ap) * cos(dl);
14569 pa = ((x != 0.0) || (y != 0.0)) ? atan2(y, x) : 0.0;
14570
14571 return pa;
14572
14573 }
14574
14575
14576 /**
14577 * This function forms three Euler angles which implement general
14578 * precession from epoch J2000.0, using the IAU 2006 model. Frame
14579 * bias (the offset between ICRS and mean J2000.0) is included.
14580 *
14581 *<p>This function is derived from the International Astronomical Union's
14582 * SOFA (Standards Of Fundamental Astronomy) software collection.
14583 *
14584 *<p>Status: support function.
14585 *
14586 *<!-- Given: -->
14587 * @param date1 double TT as a 2-part Julian Date (Note 1)
14588 * @param date2 double TT as a 2-part Julian Date (Note 1)
14589 *
14590 *<!-- Returned: -->
14591 * @return bzeta 1st rotation: radians cw around z,
14592 * 3rd rotation: radians cw around z,
14593 * 2nd rotation: radians ccw around y.
14594 *
14595 * <p>Notes:
14596 * <ol>
14597 *
14598 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
14599 * convenient way between the two arguments. For example,
14600 * JD(TT)=2450123.7 could be expressed in any of these ways,
14601 * among others:
14602 *<pre>
14603 * date1 date2
14604 *
14605 * 2450123.7 0.0 (JD method)
14606 * 2451545.0 -1421.3 (J2000 method)
14607 * 2400000.5 50123.2 (MJD method)
14608 * 2450123.5 0.2 (date & time method)
14609 *</pre>
14610 * The JD method is the most natural and convenient to use in
14611 * cases where the loss of several decimal digits of resolution
14612 * is acceptable. The J2000 method is best matched to the way
14613 * the argument is handled internally and will deliver the
14614 * optimum resolution. The MJD method and the date & time methods
14615 * are both good compromises between resolution and convenience.
14616 *
14617 * <li> The traditional accumulated precession angles zeta_A, z_A,
14618 * theta_A cannot be obtained in the usual way, namely through
14619 * polynomial expressions, because of the frame bias. The latter
14620 * means that two of the angles undergo rapid changes near this
14621 * date. They are instead the results of decomposing the
14622 * precession-bias matrix obtained by using the Fukushima-Williams
14623 * method, which does not suffer from the problem. The
14624 * decomposition returns values which can be used in the
14625 * conventional formulation and which include frame bias.
14626 *
14627 * <li> The three angles are returned in the conventional order, which
14628 * is not the same as the order of the corresponding Euler
14629 * rotations. The precession-bias matrix is
14630 * R_3(-z) x R_2(+theta) x R_3(-zeta).
14631 *
14632 * <li> Should zeta_A, z_A, theta_A angles be required that do not
14633 * contain frame bias, they are available by calling the JSOFA
14634 * function jauP06e.
14635 *</ol>
14636 *<p>Called:<ul>
14637 * <li>{@link #jauPmat06} PB matrix, IAU 2006
14638 * <li>{@link #jauRz} rotate around Z-axis
14639 * </ul>
14640 *@version 2008 May 26
14641 *
14642 * @since Release 20101201
14643 *
14644 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
14645 */
14646 public static EulerAngles jauPb06(double date1, double date2)
14647 {
14648 double r[][] = new double[3][3], r31, r32;
14649
14650
14651 /* Precession matrix via Fukushima-Williams angles. */
14652 r = jauPmat06(date1, date2);
14653
14654 /* Solve for z. */
14655 double bz = atan2(r[1][2], r[0][2]);
14656
14657 /* Remove it from the matrix. */
14658 jauRz(bz, r);
14659
14660 /* Solve for the remaining two angles. */
14661 double bzeta = atan2 (r[1][0], r[1][1]);
14662 r31 = r[2][0];
14663 r32 = r[2][1];
14664 double btheta = atan2(-dsign(sqrt(r31 * r31 + r32 * r32), r[0][2]),
14665 r[2][2]);
14666
14667 return new EulerAngles(bzeta, bz, btheta);
14668
14669 }
14670
14671
14672 /**
14673 * p-vector inner (=scalar=dot) product.
14674 *
14675 *<p>This function is derived from the International Astronomical Union's
14676 * SOFA (Standards Of Fundamental Astronomy) software collection.
14677 *
14678 *<p>Status: vector/matrix support function.
14679 *
14680 *<!-- Given: -->
14681 * @param a double[3] first p-vector
14682 * @param b double[3] second p-vector
14683 *
14684 * <!-- Returned (function value): -->
14685 * @return double a . b
14686 *
14687 *@version 2008 May 22
14688 *
14689 * @since Release 20101201
14690 *
14691 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
14692 */
14693 public static double jauPdp(double a[] , double b[] )
14694 {
14695 double w;
14696
14697
14698 w = a[0] * b[0]
14699 + a[1] * b[1]
14700 + a[2] * b[2];
14701
14702 return w;
14703
14704 }
14705
14706
14707 /**
14708 * Precession angles, IAU 2006 (Fukushima-Williams 4-angle formulation).
14709 *
14710 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 1 Feb 2010
14711 *
14712 * @since AIDA Stage 1
14713 */
14714 public static class FWPrecessionAngles{
14715 /** F-W angle gamma_bar (radians) */
14716 public double gamb;
14717 /** F-W angle phi_bar (radians) */
14718 public double phib;
14719 /** F-W angle psi_bar (radians) */
14720 public double psib;
14721 /** F-W angle epsilon_A (radians) */
14722 public double epsa;
14723 public FWPrecessionAngles(double gamb, double phib, double psib, double epsa) {
14724 this.gamb = gamb;
14725 this.phib = phib;
14726 this.psib = psib;
14727 this.epsa = epsa;
14728 }
14729 }
14730 /**
14731 * Precession angles, IAU 2006 (Fukushima-Williams 4-angle formulation).
14732 *
14733 *<p>This function is derived from the International Astronomical Union's
14734 * SOFA (Standards Of Fundamental Astronomy) software collection.
14735 *
14736 *<p>Status: canonical model.
14737 *
14738 *<!-- Given: -->
14739 * @param date1 double TT as a 2-part Julian Date (Note 1)
14740 * @param date2 double TT as a 2-part Julian Date (Note 1)
14741 *
14742 *<!-- Returned: -->
14743 * @return gamb double <u>returned</u> F-W angle gamma_bar (radians)
14744 * phib double <u>returned</u> F-W angle phi_bar (radians)
14745 * psib double <u>returned</u> F-W angle psi_bar (radians)
14746 * epsa double <u>returned</u> F-W angle epsilon_A (radians)
14747 *
14748 * <p>Notes:
14749 * <ol>
14750 *
14751 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
14752 * convenient way between the two arguments. For example,
14753 * JD(TT)=2450123.7 could be expressed in any of these ways,
14754 * among others:
14755 *<pre>
14756 * date1 date2
14757 *
14758 * 2450123.7 0.0 (JD method)
14759 * 2451545.0 -1421.3 (J2000 method)
14760 * 2400000.5 50123.2 (MJD method)
14761 * 2450123.5 0.2 (date & time method)
14762 *</pre>
14763 * The JD method is the most natural and convenient to use in
14764 * cases where the loss of several decimal digits of resolution
14765 * is acceptable. The J2000 method is best matched to the way
14766 * the argument is handled internally and will deliver the
14767 * optimum resolution. The MJD method and the date & time methods
14768 * are both good compromises between resolution and convenience.
14769 *
14770 * <li> Naming the following points:
14771 *
14772 * e = J2000.0 ecliptic pole,
14773 * p = GCRS pole,
14774 * E = mean ecliptic pole of date,
14775 * and P = mean pole of date,
14776 *
14777 * the four Fukushima-Williams angles are as follows:
14778 *
14779 * gamb = gamma_bar = epE
14780 * phib = phi_bar = pE
14781 * psib = psi_bar = pEP
14782 * epsa = epsilon_A = EP
14783 *
14784 * <li> The matrix representing the combined effects of frame bias and
14785 * precession is:
14786 *
14787 * PxB = R_1(-epsa).R_3(-psib).R_1(phib).R_3(gamb)
14788 *
14789 * <li> The matrix representing the combined effects of frame bias,
14790 * precession and nutation is simply:
14791 *
14792 * NxPxB = R_1(-epsa-dE).R_3(-psib-dP).R_1(phib).R_3(gamb)
14793 *
14794 * where dP and dE are the nutation components with respect to the
14795 * ecliptic of date.
14796 *</ol>
14797 *<p>Reference:
14798 *
14799 * Hilton, J. et al., 2006, Celest.Mech.Dyn.Astron. 94, 351
14800 *
14801 *<p>Called:<ul>
14802 * <li>{@link #jauObl06} mean obliquity, IAU 2006
14803 * </ul>
14804 *@version 2009 December 17
14805 *
14806 * @since Release 20101201
14807 *
14808 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
14809 */
14810 public static FWPrecessionAngles jauPfw06(double date1, double date2 )
14811 {
14812 double t;
14813
14814
14815 /* Interval between fundamental date J2000.0 and given date (JC). */
14816 t = ((date1 - DJ00) + date2) / DJC;
14817
14818 /* P03 bias+precession angles. */
14819 double gamb = ( -0.052928 +
14820 ( 10.556378 +
14821 ( 0.4932044 +
14822 ( -0.00031238 +
14823 ( -0.000002788 +
14824 ( 0.0000000260 )
14825 * t) * t) * t) * t) * t) * DAS2R;
14826 double phib = ( 84381.412819 +
14827 ( -46.811016 +
14828 ( 0.0511268 +
14829 ( 0.00053289 +
14830 ( -0.000000440 +
14831 ( -0.0000000176 )
14832 * t) * t) * t) * t) * t) * DAS2R;
14833 double psib = ( -0.041775 +
14834 ( 5038.481484 +
14835 ( 1.5584175 +
14836 ( -0.00018522 +
14837 ( -0.000026452 +
14838 ( -0.0000000148 )
14839 * t) * t) * t) * t) * t) * DAS2R;
14840 double epsa = jauObl06(date1, date2);
14841
14842 return new FWPrecessionAngles(gamb, phib, psib, epsa);
14843
14844 }
14845
14846
14847 /**
14848 *<p>This function is derived from the International Astronomical Union's
14849 * SOFA (Standards Of Fundamental Astronomy) software collection.
14850 *
14851 *<p>Status: support function.
14852 *
14853 * Approximate heliocentric position and velocity of a nominated major
14854 * planet: Mercury, Venus, EMB, Mars, Jupiter, Saturn, Uranus or
14855 * Neptune (but not the Earth itself).
14856 *
14857 *<!-- Given: -->
14858 * @param date1 double TDB date part A (Note 1)
14859 * @param date2 double TDB date part B (Note 1)
14860 * @param np int planet (1=Mercury, 2=Venus, 3=EMB, 4=Mars,
14861 * 5=Jupiter, 6=Saturn, 7=Uranus, 8=Neptune)
14862 *
14863 * Returned (argument):
14864 * @param pv double[2][3] (returned) planet p,v (heliocentric, J2000.0, au,au/d)
14865 *
14866 * <!-- Returned (function value): -->
14867 * @return int status: -1 = illegal NP (outside 1-8)
14868 * 0 = OK
14869 * +1 = warning: year outside 1000-3000
14870 * +2 = warning: failed to converge
14871 *
14872 * <p>Notes:
14873 * <ol>
14874 *
14875 * <li> The date date1+date2 is in the TDB time scale (in practice TT can
14876 * be used) and is a Julian Date, apportioned in any convenient way
14877 * between the two arguments. For example, JD(TDB)=2450123.7 could
14878 * be expressed in any of these ways, among others:
14879 *<pre>
14880 * date1 date2
14881 *
14882 * 2450123.7 0.0 (JD method)
14883 * 2451545.0 -1421.3 (J2000 method)
14884 * 2400000.5 50123.2 (MJD method)
14885 * 2450123.5 0.2 (date & time method)
14886 *</pre>
14887 * The JD method is the most natural and convenient to use in cases
14888 * where the loss of several decimal digits of resolution is
14889 * acceptable. The J2000 method is best matched to the way the
14890 * argument is handled internally and will deliver the optimum
14891 * resolution. The MJD method and the date & time methods are both
14892 * good compromises between resolution and convenience. The limited
14893 * accuracy of the present algorithm is such that any of the methods
14894 * is satisfactory.
14895 *
14896 * <li> If an np value outside the range 1-8 is supplied, an error status
14897 * (function value -1) is returned and the pv vector set to zeroes.
14898 *
14899 * <li> For np=3 the result is for the Earth-Moon Barycenter. To obtain
14900 * the heliocentric position and velocity of the Earth, use instead
14901 * the JSOFA function jauEpv00.
14902 *
14903 * <li> On successful return, the array pv contains the following:
14904 *<pre>
14905 * pv[0][0] x }
14906 * pv[0][1] y } heliocentric position, au
14907 * pv[0][2] z }
14908 *
14909 * pv[1][0] xdot }
14910 * pv[1][1] ydot } heliocentric velocity, au/d
14911 * pv[1][2] zdot }
14912 *</pre>
14913 * The reference frame is equatorial and is with respect to the
14914 * mean equator and equinox of epoch J2000.0.
14915 *
14916 * <li> The algorithm is due to J.L. Simon, P. Bretagnon, J. Chapront,
14917 * M. Chapront-Touze, G. Francou and J. Laskar (Bureau des
14918 * Longitudes, Paris, France). From comparisons with JPL
14919 * ephemeris DE102, they quote the following maximum errors
14920 * over the interval 1800-2050:
14921 *<pre>
14922 * L (arcsec) B (arcsec) R (km)
14923 *
14924 * Mercury 4 1 300
14925 * Venus 5 1 800
14926 * EMB 6 1 1000
14927 * Mars 17 1 7700
14928 * Jupiter 71 5 76000
14929 * Saturn 81 13 267000
14930 * Uranus 86 7 712000
14931 * Neptune 11 1 253000
14932 *</pre>
14933 * Over the interval 1000-3000, they report that the accuracy is no
14934 * worse than 1.5 times that over 1800-2050. Outside 1000-3000 the
14935 * accuracy declines.
14936 *
14937 * Comparisons of the present function with the JPL DE200 ephemeris
14938 * give the following RMS errors over the interval 1960-2025:
14939 *<pre>
14940 * position (km) velocity (m/s)
14941 *
14942 * Mercury 334 0.437
14943 * Venus 1060 0.855
14944 * EMB 2010 0.815
14945 * Mars 7690 1.98
14946 * Jupiter 71700 7.70
14947 * Saturn 199000 19.4
14948 * Uranus 564000 16.4
14949 * Neptune 158000 14.4
14950 *</pre>
14951 * Comparisons against DE200 over the interval 1800-2100 gave the
14952 * following maximum absolute differences. (The results using
14953 * DE406 were essentially the same.)
14954 *<pre>
14955 * L (arcsec) B (arcsec) R (km) Rdot (m/s)
14956 *
14957 * Mercury 7 1 500 0.7
14958 * Venus 7 1 1100 0.9
14959 * EMB 9 1 1300 1.0
14960 * Mars 26 1 9000 2.5
14961 * Jupiter 78 6 82000 8.2
14962 * Saturn 87 14 263000 24.6
14963 * Uranus 86 7 661000 27.4
14964 * Neptune 11 2 248000 21.4
14965 *</pre>
14966 * <li> The present JSOFA re-implementation of the original Simon et al.
14967 * Fortran code differs from the original in the following respects:
14968 *<ul>
14969 * <li> C instead of Fortran.
14970 *
14971 * <li> The date is supplied in two parts.
14972 *
14973 * <li> The result is returned only in equatorial Cartesian form;
14974 * the ecliptic longitude, latitude and radius vector are not
14975 * returned.
14976 *
14977 * <li> The result is in the J2000.0 equatorial frame, not ecliptic.
14978 *
14979 * <li> More is done in-line: there are fewer calls to subroutines.
14980 *
14981 * <li> Different error/warning status values are used.
14982 *
14983 * <li> A different Kepler's-equation-solver is used (avoiding
14984 * use of double precision complex).
14985 *
14986 * <li> Polynomials in t are nested to minimize rounding errors.
14987 *
14988 * <li> Explicit double constants are used to avoid mixed-mode
14989 * expressions.
14990 *</ul>
14991 * None of the above changes affects the result significantly.
14992 *
14993 * <li> The returned status indicates the most serious condition
14994 * encountered during execution of the function. Illegal np is
14995 * considered the most serious, overriding failure to converge,
14996 * which in turn takes precedence over the remote date warning.
14997 *</ol>
14998 *<p>Called:<ul>
14999 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
15000 * </ul>
15001 *<p>Reference: Simon, J.L, Bretagnon, P., Chapront, J.,
15002 * Chapront-Touze, M., Francou, G., and Laskar, J.,
15003 * Astron. Astrophys. 282, 663 (1994).
15004 *
15005 *@version 2009 December 17
15006 *
15007 * @since Release 20101201
15008 *
15009 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
15010 */
15011 public static int jauPlan94(double date1, double date2, int np, double pv[][])
15012 {
15013 /* Gaussian constant */
15014 final double GK = 0.017202098950;
15015
15016 /* Sin and cos of J2000.0 mean obliquity (IAU 1976) */
15017 final double SINEPS = 0.3977771559319137;
15018 final double COSEPS = 0.9174820620691818;
15019
15020 /* Maximum number of iterations allowed to solve Kepler's equation */
15021 final int KMAX = 10;
15022
15023 int jstat, i, k;
15024 double t, da, dl, de, dp, di, dom, dmu, arga, argl, am,
15025 ae, dae, ae2, at, r, v, si2, xq, xp, tl, xsw,
15026 xcw, xm2, xf, ci2, xms, xmc, xpxq2, x, y, z;
15027
15028 /* Planetary inverse masses */
15029 final double amas[] = { 6023600.0, /* Mercury */
15030 408523.5, /* Venus */
15031 328900.5, /* EMB */
15032 3098710.0, /* Mars */
15033 1047.355, /* Jupiter */
15034 3498.5, /* Saturn */
15035 22869.0, /* Uranus */
15036 19314.0 }; /* Neptune */
15037
15038 /*
15039 * Tables giving the mean Keplerian elements, limited to t^2 terms:
15040 *
15041 * a semi-major axis (au)
15042 * dlm mean longitude (degree and arcsecond)
15043 * e eccentricity
15044 * pi longitude of the perihelion (degree and arcsecond)
15045 * dinc inclination (degree and arcsecond)
15046 * omega longitude of the ascending node (degree and arcsecond)
15047 */
15048
15049 final double a[][] = {
15050 { 0.3870983098, 0.0, 0.0 }, /* Mercury */
15051 { 0.7233298200, 0.0, 0.0 }, /* Venus */
15052 { 1.0000010178, 0.0, 0.0 }, /* EMB */
15053 { 1.5236793419, 3e-10, 0.0 }, /* Mars */
15054 { 5.2026032092, 19132e-10, -39e-10 }, /* Jupiter */
15055 { 9.5549091915, -0.0000213896, 444e-10 }, /* Saturn */
15056 { 19.2184460618, -3716e-10, 979e-10 }, /* Uranus */
15057 { 30.1103868694, -16635e-10, 686e-10 } /* Neptune */
15058 };
15059
15060 final double dlm[][] = {
15061 { 252.25090552, 5381016286.88982, -1.92789 },
15062 { 181.97980085, 2106641364.33548, 0.59381 },
15063 { 100.46645683, 1295977422.83429, -2.04411 },
15064 { 355.43299958, 689050774.93988, 0.94264 },
15065 { 34.35151874, 109256603.77991, -30.60378 },
15066 { 50.07744430, 43996098.55732, 75.61614 },
15067 { 314.05500511, 15424811.93933, -1.75083 },
15068 { 304.34866548, 7865503.20744, 0.21103 }
15069 };
15070
15071 final double e[][] = {
15072 { 0.2056317526, 0.0002040653, -28349e-10 },
15073 { 0.0067719164, -0.0004776521, 98127e-10 },
15074 { 0.0167086342, -0.0004203654, -0.0000126734 },
15075 { 0.0934006477, 0.0009048438, -80641e-10 },
15076 { 0.0484979255, 0.0016322542, -0.0000471366 },
15077 { 0.0555481426, -0.0034664062, -0.0000643639 },
15078 { 0.0463812221, -0.0002729293, 0.0000078913 },
15079 { 0.0094557470, 0.0000603263, 0.0 }
15080 };
15081
15082 final double pi[][] = {
15083 { 77.45611904, 5719.11590, -4.83016 },
15084 { 131.56370300, 175.48640, -498.48184 },
15085 { 102.93734808, 11612.35290, 53.27577 },
15086 { 336.06023395, 15980.45908, -62.32800 },
15087 { 14.33120687, 7758.75163, 259.95938 },
15088 { 93.05723748, 20395.49439, 190.25952 },
15089 { 173.00529106, 3215.56238, -34.09288 },
15090 { 48.12027554, 1050.71912, 27.39717 }
15091 };
15092
15093 final double dinc[][] = {
15094 { 7.00498625, -214.25629, 0.28977 },
15095 { 3.39466189, -30.84437, -11.67836 },
15096 { 0.0, 469.97289, -3.35053 },
15097 { 1.84972648, -293.31722, -8.11830 },
15098 { 1.30326698, -71.55890, 11.95297 },
15099 { 2.48887878, 91.85195, -17.66225 },
15100 { 0.77319689, -60.72723, 1.25759 },
15101 { 1.76995259, 8.12333, 0.08135 }
15102 };
15103
15104 final double omega[][] = {
15105 { 48.33089304, -4515.21727, -31.79892 },
15106 { 76.67992019, -10008.48154, -51.32614 },
15107 { 174.87317577, -8679.27034, 15.34191 },
15108 { 49.55809321, -10620.90088, -230.57416 },
15109 { 100.46440702, 6362.03561, 326.52178 },
15110 { 113.66550252, -9240.19942, -66.23743 },
15111 { 74.00595701, 2669.15033, 145.93964 },
15112 { 131.78405702, -221.94322, -0.78728 }
15113 };
15114
15115 /* Tables for trigonometric terms to be added to the mean elements of */
15116 /* the semi-major axes */
15117
15118 final double kp[][] = {
15119 { 69613, 75645, 88306, 59899, 15746, 71087, 142173, 3086, 0 },
15120 { 21863, 32794, 26934, 10931, 26250, 43725, 53867, 28939, 0 },
15121 { 16002, 21863, 32004, 10931, 14529, 16368, 15318, 32794, 0 },
15122 { 6345, 7818, 15636, 7077, 8184, 14163, 1107, 4872, 0 },
15123 { 1760, 1454, 1167, 880, 287, 2640, 19, 2047, 1454 },
15124 { 574, 0, 880, 287, 19, 1760, 1167, 306, 574 },
15125 { 204, 0, 177, 1265, 4, 385, 200, 208, 204 },
15126 { 0, 102, 106, 4, 98, 1367, 487, 204, 0 }
15127 };
15128
15129 final double ca[][] = {
15130 { 4, -13, 11, -9, -9, -3, -1, 4, 0 },
15131 { -156, 59, -42, 6, 19, -20, -10, -12, 0 },
15132 { 64, -152, 62, -8, 32, -41, 19, -11, 0 },
15133 { 124, 621, -145, 208, 54, -57, 30, 15, 0 },
15134 { -23437, -2634, 6601, 6259, -1507,-1821, 2620, -2115, -1489 },
15135 { 62911,-119919, 79336,17814,-24241,12068, 8306, -4893, 8902 },
15136 { 389061,-262125,-44088, 8387,-22976,-2093, -615, -9720, 6633 },
15137 { -412235,-157046,-31430,37817, -9740, -13, -7449, 9644, 0 }
15138 };
15139
15140 final double sa[][] = {
15141 { -29, -1, 9, 6, -6, 5, 4, 0, 0 },
15142 { -48, -125, -26, -37, 18, -13, -20, -2, 0 },
15143 { -150, -46, 68, 54, 14, 24, -28, 22, 0 },
15144 { -621, 532, -694, -20, 192, -94, 71, -73, 0 },
15145 { -14614,-19828, -5869, 1881, -4372, -2255, 782, 930, 913 },
15146 { 139737, 0, 24667, 51123, -5102, 7429, -4095, -1976, -9566 },
15147 { -138081, 0, 37205,-49039,-41901,-33872,-27037,-12474, 18797 },
15148 { 0, 28492,133236, 69654, 52322,-49577,-26430, -3593, 0 }
15149 };
15150
15151 /* Tables giving the trigonometric terms to be added to the mean */
15152 /* elements of the mean longitudes */
15153
15154 final double kq[][] = {
15155 { 3086,15746,69613,59899,75645,88306, 12661, 2658, 0, 0 },
15156 { 21863,32794,10931, 73, 4387,26934, 1473, 2157, 0, 0 },
15157 { 10,16002,21863,10931, 1473,32004, 4387, 73, 0, 0 },
15158 { 10, 6345, 7818, 1107,15636, 7077, 8184, 532, 10, 0 },
15159 { 19, 1760, 1454, 287, 1167, 880, 574, 2640, 19, 1454 },
15160 { 19, 574, 287, 306, 1760, 12, 31, 38, 19, 574 },
15161 { 4, 204, 177, 8, 31, 200, 1265, 102, 4, 204 },
15162 { 4, 102, 106, 8, 98, 1367, 487, 204, 4, 102 }
15163 };
15164
15165 final double cl[][] = {
15166 { 21, -95, -157, 41, -5, 42, 23, 30, 0, 0 },
15167 { -160, -313, -235, 60, -74, -76, -27, 34, 0, 0 },
15168 { -325, -322, -79, 232, -52, 97, 55, -41, 0, 0 },
15169 { 2268, -979, 802, 602, -668, -33, 345, 201, -55, 0 },
15170 { 7610, -4997,-7689,-5841,-2617, 1115,-748,-607, 6074, 354 },
15171 { -18549, 30125,20012, -730, 824, 23,1289,-352, -14767, -2062 },
15172 { -135245,-14594, 4197,-4030,-5630,-2898,2540,-306, 2939, 1986 },
15173 { 89948, 2103, 8963, 2695, 3682, 1648, 866,-154, -1963, -283 }
15174 };
15175
15176 final double sl[][] = {
15177 { -342, 136, -23, 62, 66, -52, -33, 17, 0, 0 },
15178 { 524, -149, -35, 117, 151, 122, -71, -62, 0, 0 },
15179 { -105, -137, 258, 35, -116, -88,-112, -80, 0, 0 },
15180 { 854, -205, -936, -240, 140, -341, -97, -232, 536, 0 },
15181 { -56980, 8016, 1012, 1448,-3024,-3710, 318, 503, 3767, 577 },
15182 { 138606,-13478,-4964, 1441,-1319,-1482, 427, 1236, -9167, -1918 },
15183 { 71234,-41116, 5334,-4935,-1848, 66, 434, -1748, 3780, -701 },
15184 { -47645, 11647, 2166, 3194, 679, 0,-244, -419, -2531, 48 }
15185 };
15186
15187 /*--------------------------------------------------------------------*/
15188
15189 /* Validate the planet number. */
15190 if ((np < 1) || (np > 8)) {
15191 jstat = -1;
15192
15193 /* Reset the result in case of failure. */
15194 for (k = 0; k < 2; k++) {
15195 for (i = 0; i < 3; i++) {
15196 pv[k][i] = 0.0;
15197 }
15198 }
15199
15200 } else {
15201
15202 /* Decrement the planet number to start at zero. */
15203 np--;
15204
15205 /* Time: Julian millennia since J2000.0. */
15206 t = ((date1 - DJ00) + date2) / DJM;
15207
15208 /* OK status unless remote date. */
15209 jstat = abs(t) <= 1.0 ? 0 : 1;
15210
15211 /* Compute the mean elements. */
15212 da = a[np][0] +
15213 (a[np][1] +
15214 a[np][2] * t) * t;
15215 dl = (3600.0 * dlm[np][0] +
15216 (dlm[np][1] +
15217 dlm[np][2] * t) * t) * DAS2R;
15218 de = e[np][0] +
15219 ( e[np][1] +
15220 e[np][2] * t) * t;
15221 dp = jauAnpm((3600.0 * pi[np][0] +
15222 (pi[np][1] +
15223 pi[np][2] * t) * t) * DAS2R);
15224 di = (3600.0 * dinc[np][0] +
15225 (dinc[np][1] +
15226 dinc[np][2] * t) * t) * DAS2R;
15227 dom = jauAnpm((3600.0 * omega[np][0] +
15228 (omega[np][1] +
15229 omega[np][2] * t) * t) * DAS2R);
15230
15231 /* Apply the trigonometric terms. */
15232 dmu = 0.35953620 * t;
15233 for (k = 0; k < 8; k++) {
15234 arga = kp[np][k] * dmu;
15235 argl = kq[np][k] * dmu;
15236 da += (ca[np][k] * cos(arga) +
15237 sa[np][k] * sin(arga)) * 1e-7;
15238 dl += (cl[np][k] * cos(argl) +
15239 sl[np][k] * sin(argl)) * 1e-7;
15240 }
15241 arga = kp[np][8] * dmu;
15242 da += t * (ca[np][8] * cos(arga) +
15243 sa[np][8] * sin(arga)) * 1e-7;
15244 for (k = 8; k < 10; k++) {
15245 argl = kq[np][k] * dmu;
15246 dl += t * (cl[np][k] * cos(argl) +
15247 sl[np][k] * sin(argl)) * 1e-7;
15248 }
15249 dl = fmod(dl, D2PI);
15250
15251 /* Iterative soln. of Kepler's equation to get eccentric anomaly. */
15252 am = dl - dp;
15253 ae = am + de * sin(am);
15254 k = 0;
15255 dae = 1.0;
15256 while (k < KMAX && abs(dae) > 1e-12) {
15257 dae = (am - ae + de * sin(ae)) / (1.0 - de * cos(ae));
15258 ae += dae;
15259 k++;
15260 if (k == KMAX-1) jstat = 2;
15261 }
15262
15263 /* True anomaly. */
15264 ae2 = ae / 2.0;
15265 at = 2.0 * atan2(sqrt((1.0 + de) / (1.0 - de)) * sin(ae2),
15266 cos(ae2));
15267
15268 /* Distance (au) and speed (radians per day). */
15269 r = da * (1.0 - de * cos(ae));
15270 v = GK * sqrt((1.0 + 1.0 / amas[np]) / (da * da * da));
15271
15272 si2 = sin(di / 2.0);
15273 xq = si2 * cos(dom);
15274 xp = si2 * sin(dom);
15275 tl = at + dp;
15276 xsw = sin(tl);
15277 xcw = cos(tl);
15278 xm2 = 2.0 * (xp * xcw - xq * xsw);
15279 xf = da / sqrt(1 - de * de);
15280 ci2 = cos(di / 2.0);
15281 xms = (de * sin(dp) + xsw) * xf;
15282 xmc = (de * cos(dp) + xcw) * xf;
15283 xpxq2 = 2 * xp * xq;
15284
15285 /* Position (J2000.0 ecliptic x,y,z in au). */
15286 x = r * (xcw - xm2 * xp);
15287 y = r * (xsw + xm2 * xq);
15288 z = r * (-xm2 * ci2);
15289
15290 /* Rotate to equatorial. */
15291 pv[0][0] = x;
15292 pv[0][1] = y * COSEPS - z * SINEPS;
15293 pv[0][2] = y * SINEPS + z * COSEPS;
15294
15295 /* Velocity (J2000.0 ecliptic xdot,ydot,zdot in au/d). */
15296 x = v * (( -1.0 + 2.0 * xp * xp) * xms + xpxq2 * xmc);
15297 y = v * (( 1.0 - 2.0 * xq * xq) * xmc - xpxq2 * xms);
15298 z = v * (2.0 * ci2 * (xp * xms + xq * xmc));
15299
15300 /* Rotate to equatorial. */
15301 pv[1][0] = x;
15302 pv[1][1] = y * COSEPS - z * SINEPS;
15303 pv[1][2] = y * SINEPS + z * COSEPS;
15304
15305 }
15306
15307 /* Return the status. */
15308 return jstat;
15309
15310 }
15311
15312
15313 /**
15314 * Modulus of p-vector.
15315 *
15316 *<p>This function is derived from the International Astronomical Union's
15317 * SOFA (Standards Of Fundamental Astronomy) software collection.
15318 *
15319 *<p>Status: vector/matrix support function.
15320 *
15321 *<!-- Given: -->
15322 * @param p double[3] p-vector
15323 *
15324 * <!-- Returned (function value): -->
15325 * @return double modulus
15326 *
15327 *@version 2008 May 22
15328 *
15329 * @since Release 20101201
15330 *
15331 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
15332 */
15333 public static double jauPm(double p[] )
15334 {
15335 double w;
15336
15337
15338 w = sqrt( p[0] * p[0]
15339 + p[1] * p[1]
15340 + p[2] * p[2] );
15341
15342 return w;
15343
15344 }
15345
15346
15347 /**
15348 * Precession matrix (including frame bias) from GCRS to a specified
15349 * date, IAU 2000 model.
15350 *
15351 *<p>This function is derived from the International Astronomical Union's
15352 * SOFA (Standards Of Fundamental Astronomy) software collection.
15353 *
15354 *<p>Status: support function.
15355 *
15356 *<!-- Given: -->
15357 * @param date1 double TT as a 2-part Julian Date (Note 1)
15358 * @param date2 double TT as a 2-part Julian Date (Note 1)
15359 *
15360 *<!-- Returned: -->
15361 * @return rbp double[3][3] <u>returned</u> bias-precession matrix (Note 2)
15362 *
15363 * <p>Notes:
15364 * <ol>
15365 *
15366 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
15367 * convenient way between the two arguments. For example,
15368 * JD(TT)=2450123.7 could be expressed in any of these ways,
15369 * among others:
15370 *<pre>
15371 * date1 date2
15372 *
15373 * 2450123.7 0.0 (JD method)
15374 * 2451545.0 -1421.3 (J2000 method)
15375 * 2400000.5 50123.2 (MJD method)
15376 * 2450123.5 0.2 (date & time method)
15377 *</pre>
15378 * The JD method is the most natural and convenient to use in
15379 * cases where the loss of several decimal digits of resolution
15380 * is acceptable. The J2000 method is best matched to the way
15381 * the argument is handled internally and will deliver the
15382 * optimum resolution. The MJD method and the date & time methods
15383 * are both good compromises between resolution and convenience.
15384 *
15385 * <li> The matrix operates in the sense V(date) = rbp * V(GCRS), where
15386 * the p-vector V(GCRS) is with respect to the Geocentric Celestial
15387 * Reference System (IAU, 2000) and the p-vector V(date) is with
15388 * respect to the mean equatorial triad of the given date.
15389 *</ol>
15390 *<p>Called:<ul>
15391 * <li>{@link #jauBp00} frame bias and precession matrices, IAU 2000
15392 * </ul>
15393 *<p>Reference:
15394 *
15395 * IAU: Trans. International Astronomical Union, Vol. XXIVB; Proc.
15396 * 24th General Assembly, Manchester, UK. Resolutions B1.3, B1.6.
15397 * (2000)
15398 *
15399 *@version 2009 December 21
15400 *
15401 * @since Release 20101201
15402 *
15403 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
15404 */
15405 public static double[][] jauPmat00(double date1, double date2)
15406 {
15407 double rb[][] = new double[3][3], rp[][] = new double[3][3],
15408 rbp[][] = new double[3][3];
15409 /* Obtain the required matrix (discarding others). */
15410 jauBp00(date1, date2, rb, rp, rbp);
15411
15412 return rbp;
15413
15414 }
15415
15416
15417 /**
15418 * Precession matrix (including frame bias) from GCRS to a specified
15419 * date, IAU 2006 model.
15420 *
15421 *<p>This function is derived from the International Astronomical Union's
15422 * SOFA (Standards Of Fundamental Astronomy) software collection.
15423 *
15424 *<p>Status: support function.
15425 *
15426 *<!-- Given: -->
15427 * @param date1 double TT as a 2-part Julian Date (Note 1)
15428 * @param date2 double TT as a 2-part Julian Date (Note 1)
15429 *
15430 *<!-- Returned: -->
15431 * @return rbp double[3][3] <u>returned</u> bias-precession matrix (Note 2)
15432 *
15433 * <p>Notes:
15434 * <ol>
15435 *
15436 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
15437 * convenient way between the two arguments. For example,
15438 * JD(TT)=2450123.7 could be expressed in any of these ways,
15439 * among others:
15440 *<pre>
15441 * date1 date2
15442 *
15443 * 2450123.7 0.0 (JD method)
15444 * 2451545.0 -1421.3 (J2000 method)
15445 * 2400000.5 50123.2 (MJD method)
15446 * 2450123.5 0.2 (date & time method)
15447 *</pre>
15448 * The JD method is the most natural and convenient to use in
15449 * cases where the loss of several decimal digits of resolution
15450 * is acceptable. The J2000 method is best matched to the way
15451 * the argument is handled internally and will deliver the
15452 * optimum resolution. The MJD method and the date & time methods
15453 * are both good compromises between resolution and convenience.
15454 *
15455 * <li> The matrix operates in the sense V(date) = rbp * V(GCRS), where
15456 * the p-vector V(GCRS) is with respect to the Geocentric Celestial
15457 * Reference System (IAU, 2000) and the p-vector V(date) is with
15458 * respect to the mean equatorial triad of the given date.
15459 *</ol>
15460 *<p>Called:<ul>
15461 * <li>{@link #jauPfw06} bias-precession F-W angles, IAU 2006
15462 * <li>{@link #jauFw2m} F-W angles to r-matrix
15463 * </ul>
15464 *<p>References:
15465 *
15466 * <p>Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855
15467 *
15468 * <p>Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981
15469 *
15470 *@version 2009 December 21
15471 *
15472 * @since Release 20101201
15473 *
15474 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
15475 */
15476 public static double[][] jauPmat06(double date1, double date2)
15477 {
15478
15479 /* Bias-precession Fukushima-Williams angles. */
15480 FWPrecessionAngles fw = jauPfw06(date1, date2);
15481
15482 /* Form the matrix. */
15483 double[][] rbp = jauFw2m(fw.gamb, fw.phib, fw.psib, fw.epsa );
15484
15485 return rbp;
15486
15487 }
15488
15489
15490 /**
15491 * Precession matrix from J2000.0 to a specified date, IAU 1976 model.
15492 *
15493 *<p>This function is derived from the International Astronomical Union's
15494 * SOFA (Standards Of Fundamental Astronomy) software collection.
15495 *
15496 *<p>Status: support function.
15497 *
15498 *<!-- Given: -->
15499 * @param date1 double ending date, TT (Note 1)
15500 * @param date2 double ending date, TT (Note 1)
15501 *
15502 *<!-- Returned: -->
15503 * @return rmatp double[3][3] <u>returned</u> precession matrix, J2000.0 -> date1+date2
15504 *
15505 * <p>Notes:
15506 * <ol>
15507 *
15508 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
15509 * convenient way between the two arguments. For example,
15510 * JD(TT)=2450123.7 could be expressed in any of these ways,
15511 * among others:
15512 *<pre>
15513 * date1 date2
15514 *
15515 * 2450123.7 0.0 (JD method)
15516 * 2451545.0 -1421.3 (J2000 method)
15517 * 2400000.5 50123.2 (MJD method)
15518 * 2450123.5 0.2 (date & time method)
15519 *</pre>
15520 * The JD method is the most natural and convenient to use in
15521 * cases where the loss of several decimal digits of resolution
15522 * is acceptable. The J2000 method is best matched to the way
15523 * the argument is handled internally and will deliver the
15524 * optimum resolution. The MJD method and the date & time methods
15525 * are both good compromises between resolution and convenience.
15526 *
15527 * <li> The matrix operates in the sense V(date) = RMATP * V(J2000),
15528 * where the p-vector V(J2000) is with respect to the mean
15529 * equatorial triad of epoch J2000.0 and the p-vector V(date)
15530 * is with respect to the mean equatorial triad of the given
15531 * date.
15532 *
15533 * <li> Though the matrix method itself is rigorous, the precession
15534 * angles are expressed through canonical polynomials which are
15535 * valid only for a limited time span. In addition, the IAU 1976
15536 * precession rate is known to be imperfect. The absolute accuracy
15537 * of the present formulation is better than 0.1 arcsec from
15538 * 1960AD to 2040AD, better than 1 arcsec from 1640AD to 2360AD,
15539 * and remains below 3 arcsec for the whole of the period
15540 * 500BC to 3000AD. The errors exceed 10 arcsec outside the
15541 * range 1200BC to 3900AD, exceed 100 arcsec outside 4200BC to
15542 * 5600AD and exceed 1000 arcsec outside 6800BC to 8200AD.
15543 *</ol>
15544 *<p>Called:<ul>
15545 * <li>{@link #jauPrec76} accumulated precession angles, IAU 1976
15546 * <li>{@link #jauIr} initialize r-matrix to identity
15547 * <li>{@link #jauRz} rotate around Z-axis
15548 * <li>{@link #jauRy} rotate around Y-axis
15549 * <li>{@link #jauCr} copy r-matrix
15550 * </ul>
15551 *<p>References:
15552 *
15553 * <p>Lieske, J.H., 1979, Astron.Astrophys. 73, 282.
15554 * equations (6) & (7), p283.
15555 *
15556 * Kaplan,G.H., 1981. USNO circular no. 163, pA2.
15557 *
15558 *@version 2009 December 18
15559 *
15560 * @since Release 20101201
15561 *
15562 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
15563 */
15564 public static double[][] jauPmat76(double date1, double date2)
15565 {
15566 double wmat[][] = new double[3][3];
15567 double rmatp[][] = new double[3][3];
15568
15569 /* Precession Euler angles, J2000.0 to specified date. */
15570 EulerAngles euler = jauPrec76(DJ00, 0.0, date1, date2);
15571
15572 /* Form the rotation matrix. */
15573 jauIr( wmat);
15574 jauRz( -euler.zeta, wmat);
15575 jauRy( euler.theta, wmat);
15576 jauRz( -euler.z, wmat);
15577 jauCr(wmat, rmatp);
15578
15579 return rmatp;
15580
15581 }
15582
15583
15584 /**
15585 * P-vector subtraction.
15586 *
15587 *<p>This function is derived from the International Astronomical Union's
15588 * SOFA (Standards Of Fundamental Astronomy) software collection.
15589 *
15590 *<p>Status: vector/matrix support function.
15591 *
15592 *<!-- Given: -->
15593 * @param a double[3] first p-vector
15594 * @param b double[3] second p-vector
15595 *
15596 *<!-- Returned: -->
15597 * @return amb double[3] <u>returned</u> a - b
15598 *
15599 * Note:
15600 * It is permissible to re-use the same array for any of the
15601 * arguments.
15602 *
15603 *@version 2008 November 18
15604 *
15605 * @since Release 20101201
15606 *
15607 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
15608 */
15609 public static double[] jauPmp(double a[] , double b[] )
15610 {
15611 double amb[] = new double[3];
15612 amb[0] = a[0] - b[0];
15613 amb[1] = a[1] - b[1];
15614 amb[2] = a[2] - b[2];
15615
15616 return amb;
15617
15618 }
15619
15620 /**
15621 * A normalized vector with r being the modulus and u[3] being the unit vector.
15622 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 1 Feb 2010
15623 *
15624 * @since AIDA Stage 1
15625 */
15626 public static class NormalizedVector {
15627 public double r;
15628 public double u[];
15629 public NormalizedVector(double r, double u[] ) {
15630 this.r = r;
15631 this.u = u;
15632 }
15633 }
15634 /**
15635 * Convert a p-vector into modulus and unit vector.
15636 *
15637 *<p>This function is derived from the International Astronomical Union's
15638 * SOFA (Standards Of Fundamental Astronomy) software collection.
15639 *
15640 *<p>Status: vector/matrix support function.
15641 *
15642 *<!-- Given: -->
15643 * @param p double[3] p-vector
15644 *
15645 *<!-- Returned: -->
15646 * @return r double <u>returned</u> modulus
15647 * u double[3] <u>returned</u> unit vector
15648 *
15649 * <p>Notes:
15650 * <ol>
15651 *
15652 * <li> If p is null, the result is null. Otherwise the result is a unit
15653 * vector.
15654 *
15655 * <li> It is permissible to re-use the same array for any of the
15656 * arguments.
15657 *</ol>
15658 *<p>Called:<ul>
15659 * <li>{@link #jauPm} modulus of p-vector
15660 * <li>{@link #jauZp} zero p-vector
15661 * <li>{@link #jauSxp} multiply p-vector by scalar
15662 * </ul>
15663 *@version 2008 November 18
15664 *
15665 * @since Release 20101201
15666 *
15667 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
15668 */
15669 public static NormalizedVector jauPn(double p[])
15670 {
15671 double w;
15672
15673 /* Obtain the modulus and test for zero. */
15674 w = jauPm(p);
15675 NormalizedVector nv = new NormalizedVector(w, new double[3]);
15676 if (w == 0.0) {
15677
15678 /* Null vector. */
15679 jauZp(nv.u);
15680
15681 } else {
15682
15683 /* Unit vector. */
15684 nv.u = jauSxp(1.0/w, p);
15685 }
15686
15687
15688 return nv;
15689
15690 }
15691
15692
15693 /**
15694 * Precession-nutation, IAU 2000 model: a multi-purpose function,
15695 * supporting classical (equinox-based) use directly and CIO-based
15696 * use indirectly.
15697 *
15698 *<p>This function is derived from the International Astronomical Union's
15699 * SOFA (Standards Of Fundamental Astronomy) software collection.
15700 *
15701 *<p>Status: support function.
15702 *
15703 *<!-- Given: -->
15704 * @param date1 double TT as a 2-part Julian Date (Note 1)
15705 * @param date2 double TT as a 2-part Julian Date (Note 1)
15706 * @param dpsi double nutation (Note 2)
15707 * @param deps double nutation (Note 2)
15708 *
15709 *<!-- Returned: -->
15710 * @return epsa double <u>returned</u> mean obliquity (Note 3),
15711 * rb double[3][3] <u>returned</u> frame bias matrix (Note 4),
15712 * rp double[3][3] <u>returned</u> precession matrix (Note 5),
15713 * rbp double[3][3] <u>returned</u> bias-precession matrix (Note 6),
15714 * rn double[3][3] <u>returned</u> nutation matrix (Note 7),
15715 * rbpn double[3][3] <u>returned</u> GCRS-to-true matrix (Note 8)
15716 *
15717 * <p>Notes:
15718 * <ol>
15719 *
15720 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
15721 * convenient way between the two arguments. For example,
15722 * JD(TT)=2450123.7 could be expressed in any of these ways,
15723 * among others:
15724 *<pre>
15725 * date1 date2
15726 *
15727 * 2450123.7 0.0 (JD method)
15728 * 2451545.0 -1421.3 (J2000 method)
15729 * 2400000.5 50123.2 (MJD method)
15730 * 2450123.5 0.2 (date & time method)
15731 *</pre>
15732 * The JD method is the most natural and convenient to use in
15733 * cases where the loss of several decimal digits of resolution
15734 * is acceptable. The J2000 method is best matched to the way
15735 * the argument is handled internally and will deliver the
15736 * optimum resolution. The MJD method and the date & time methods
15737 * are both good compromises between resolution and convenience.
15738 *
15739 * <li> The caller is responsible for providing the nutation components;
15740 * they are in longitude and obliquity, in radians and are with
15741 * respect to the equinox and ecliptic of date. For high-accuracy
15742 * applications, free core nutation should be included as well as
15743 * any other relevant corrections to the position of the CIP.
15744 *
15745 * <li> The returned mean obliquity is consistent with the IAU 2000
15746 * precession-nutation models.
15747 *
15748 * <li> The matrix rb transforms vectors from GCRS to J2000.0 mean
15749 * equator and equinox by applying frame bias.
15750 *
15751 * <li> The matrix rp transforms vectors from J2000.0 mean equator and
15752 * equinox to mean equator and equinox of date by applying
15753 * precession.
15754 *
15755 * <li> The matrix rbp transforms vectors from GCRS to mean equator and
15756 * equinox of date by applying frame bias then precession. It is
15757 * the product rp x rb.
15758 *
15759 * <li> The matrix rn transforms vectors from mean equator and equinox of
15760 * date to true equator and equinox of date by applying the nutation
15761 * (luni-solar + planetary).
15762 *
15763 * <li> The matrix rbpn transforms vectors from GCRS to true equator and
15764 * equinox of date. It is the product rn x rbp, applying frame
15765 * bias, precession and nutation in that order.
15766 *
15767 * <li> It is permissible to re-use the same array in the returned
15768 * arguments. The arrays are filled in the order given.
15769 *</ol>
15770 *<p>Called:<ul>
15771 * <li>{@link #jauPr00} IAU 2000 precession adjustments
15772 * <li>{@link #jauObl80} mean obliquity, IAU 1980
15773 * <li>{@link #jauBp00} frame bias and precession matrices, IAU 2000
15774 * <li>{@link #jauCr} copy r-matrix
15775 * <li>{@link #jauNumat} form nutation matrix
15776 * <li>{@link #jauRxr} product of two r-matrices
15777 * </ul>
15778 *<p>Reference:
15779 *
15780 * <p>Capitaine, N., Chapront, J., Lambert, S. and Wallace, P.,
15781 * "Expressions for the Celestial Intermediate Pole and Celestial
15782 * Ephemeris Origin consistent with the IAU 2000A precession-
15783 * nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
15784 *
15785 * n.b. The celestial ephemeris origin (CEO) was renamed "celestial
15786 * intermediate origin" (CIO) by IAU 2006 Resolution 2.
15787 *
15788 *@version 2010 January 18
15789 *
15790 * @since Release 20101201
15791 *
15792 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
15793 */
15794 public static PrecessionNutation jauPn00(double date1, double date2, double dpsi, double deps)
15795 {
15796 double rbpw[][] = new double[3][3], rnw[][] = new double[3][3];
15797 double[][] rb = new double[3][3];
15798 double[][] rp = new double[3][3];
15799 double[][] rbp = new double[3][3];
15800 double[][] rn = new double[3][3];
15801 double[][] rbpn = new double[3][3];
15802
15803
15804 /* IAU 2000 precession-rate adjustments. */
15805 PrecessionDeltaTerms nut = jauPr00(date1, date2);
15806
15807 /* Mean obliquity, consistent with IAU 2000 precession-nutation. */
15808 double epsa = jauObl80(date1, date2) + nut.depspr;
15809
15810 /* Frame bias and precession matrices and their product. */
15811 jauBp00(date1, date2, rb, rp, rbpw);
15812 jauCr(rbpw, rbp);
15813
15814 /* Nutation matrix. */
15815 rnw = jauNumat(epsa, dpsi, deps);
15816 jauCr(rnw, rn);
15817
15818 /* Bias-precession-nutation matrix (classical). */
15819 rbpn = jauRxr(rnw, rbpw);
15820
15821 return new PrecessionNutation(dpsi, deps, epsa, rb, rp, rbp, rn, rbpn);
15822
15823 }
15824
15825
15826 /**
15827 * Precession-nutation model.
15828 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
15829 *
15830 * @since AIDA Stage 1
15831 */
15832 public static class PrecessionNutation {
15833 public NutationTerms nut;
15834 /** mean obliquity */
15835 public double epsa;
15836 /** frame bias matrix */
15837 public double rb[][];
15838 /** precession matrix */
15839 public double rp[][];
15840 /** bias-precession matrix */
15841 public double rbp[][];
15842 /** nutation matrix */
15843 public double rn[][];
15844 /** GCRS-to-true matrix */
15845 public double rbpn[][];
15846 public PrecessionNutation(double dpsi, double deps, double epsa,
15847 double rb[][], double rp[][], double rbp[][],
15848 double rn[][], double rbpn[][]){
15849 this.nut = new NutationTerms(dpsi, deps);
15850 this.epsa = epsa;
15851 this.rb = rb;
15852 this.rp = rp;
15853 this.rbp = rbp;
15854 this.rn = rn;
15855 this.rbpn = rbpn;
15856 }
15857
15858 }
15859 /**
15860 * Precession-nutation, IAU 2000A model: a multi-purpose function,
15861 * supporting classical (equinox-based) use directly and CIO-based
15862 * use indirectly.
15863 *
15864 *<p>This function is derived from the International Astronomical Union's
15865 * SOFA (Standards Of Fundamental Astronomy) software collection.
15866 *
15867 *<p>Status: support function.
15868 *
15869 *<!-- Given: -->
15870 * @param date1 double TT as a 2-part Julian Date (Note 1)
15871 * @param date2 double TT as a 2-part Julian Date (Note 1)
15872 *
15873 *<!-- Returned: -->
15874 * @return dpsi double <u>returned</u> nutation (Note 2)
15875 * deps double <u>returned</u> nutation (Note 2)
15876 * epsa double <u>returned</u> mean obliquity (Note 3)
15877 * rb double[3][3] <u>returned</u> frame bias matrix (Note 4)
15878 * rp double[3][3] <u>returned</u> precession matrix (Note 5)
15879 * rbp double[3][3] <u>returned</u> bias-precession matrix (Note 6)
15880 * rn double[3][3] <u>returned</u> nutation matrix (Note 7)
15881 * rbpn double[3][3] <u>returned</u> GCRS-to-true matrix (Notes 8,9)
15882 *
15883 * <p>Notes:
15884 * <ol>
15885 *
15886 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
15887 * convenient way between the two arguments. For example,
15888 * JD(TT)=2450123.7 could be expressed in any of these ways,
15889 * among others:
15890 *<pre>
15891 * date1 date2
15892 *
15893 * 2450123.7 0.0 (JD method)
15894 * 2451545.0 -1421.3 (J2000 method)
15895 * 2400000.5 50123.2 (MJD method)
15896 * 2450123.5 0.2 (date & time method)
15897 *</pre>
15898 * The JD method is the most natural and convenient to use in
15899 * cases where the loss of several decimal digits of resolution
15900 * is acceptable. The J2000 method is best matched to the way
15901 * the argument is handled internally and will deliver the
15902 * optimum resolution. The MJD method and the date & time methods
15903 * are both good compromises between resolution and convenience.
15904 *
15905 * <li> The nutation components (luni-solar + planetary, IAU 2000A) in
15906 * longitude and obliquity are in radians and with respect to the
15907 * equinox and ecliptic of date. Free core nutation is omitted;
15908 * for the utmost accuracy, use the jauPn00 function, where the
15909 * nutation components are caller-specified. For faster but
15910 * slightly less accurate results, use the jauPn00b function.
15911 *
15912 * <li> The mean obliquity is consistent with the IAU 2000 precession.
15913 *
15914 * <li> The matrix rb transforms vectors from GCRS to J2000.0 mean
15915 * equator and equinox by applying frame bias.
15916 *
15917 * <li> The matrix rp transforms vectors from J2000.0 mean equator and
15918 * equinox to mean equator and equinox of date by applying
15919 * precession.
15920 *
15921 * <li> The matrix rbp transforms vectors from GCRS to mean equator and
15922 * equinox of date by applying frame bias then precession. It is
15923 * the product rp x rb.
15924 *
15925 * <li> The matrix rn transforms vectors from mean equator and equinox
15926 * of date to true equator and equinox of date by applying the
15927 * nutation (luni-solar + planetary).
15928 *
15929 * <li> The matrix rbpn transforms vectors from GCRS to true equator and
15930 * equinox of date. It is the product rn x rbp, applying frame
15931 * bias, precession and nutation in that order.
15932 *
15933 * <li> The X,Y,Z coordinates of the IAU 2000A Celestial Intermediate
15934 * Pole are elements (3,1-3) of the GCRS-to-true matrix,
15935 * i.e. rbpn[2][0-2].
15936 *
15937 * <li> It is permissible to re-use the same array in the returned
15938 * arguments. The arrays are filled in the order given.
15939 *</ol>
15940 *<p>Called:<ul>
15941 * <li>{@link #jauNut00a} nutation, IAU 2000A
15942 * <li>{@link #jauPn00} bias/precession/nutation results, IAU 2000
15943 * </ul>
15944 *<p>Reference:
15945 *
15946 * <p>Capitaine, N., Chapront, J., Lambert, S. and Wallace, P.,
15947 * "Expressions for the Celestial Intermediate Pole and Celestial
15948 * Ephemeris Origin consistent with the IAU 2000A precession-
15949 * nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
15950 *
15951 * n.b. The celestial ephemeris origin (CEO) was renamed "celestial
15952 * intermediate origin" (CIO) by IAU 2006 Resolution 2.
15953 *
15954 *@version 2010 January 18
15955 *
15956 * @since Release 20101201
15957 *
15958 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
15959 */
15960 public static PrecessionNutation jauPn00a(double date1, double date2)
15961 {
15962 /* Nutation. */
15963 NutationTerms nut = jauNut00a(date1, date2);
15964
15965 /* Remaining results. */
15966 return jauPn00(date1, date2, nut.dpsi, nut.deps);
15967
15968
15969 }
15970
15971
15972 /**
15973 * Precession-nutation, IAU 2000B model: a multi-purpose function,
15974 * supporting classical (equinox-based) use directly and CIO-based
15975 * use indirectly.
15976 *
15977 *<p>This function is derived from the International Astronomical Union's
15978 * SOFA (Standards Of Fundamental Astronomy) software collection.
15979 *
15980 *<p>Status: support function.
15981 *
15982 *<!-- Given: -->
15983 * @param date1 double TT as a 2-part Julian Date (Note 1)
15984 * @param date2 double TT as a 2-part Julian Date (Note 1)
15985 *
15986 *<!-- Returned: -->
15987 * @return dpsi,deps double <u>returned</u> nutation (Note 2)
15988 * epsa double <u>returned</u> mean obliquity (Note 3)
15989 * rb double[3][3] <u>returned</u> frame bias matrix (Note 4)
15990 * rp double[3][3] <u>returned</u> precession matrix (Note 5)
15991 * rbp double[3][3] <u>returned</u> bias-precession matrix (Note 6)
15992 * rn double[3][3] <u>returned</u> nutation matrix (Note 7)
15993 * rbpn double[3][3] <u>returned</u> GCRS-to-true matrix (Notes 8,9)
15994 *
15995 * <p>Notes:
15996 * <ol>
15997 *
15998 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
15999 * convenient way between the two arguments. For example,
16000 * JD(TT)=2450123.7 could be expressed in any of these ways,
16001 * among others:
16002 *<pre>
16003 * date1 date2
16004 *
16005 * 2450123.7 0.0 (JD method)
16006 * 2451545.0 -1421.3 (J2000 method)
16007 * 2400000.5 50123.2 (MJD method)
16008 * 2450123.5 0.2 (date & time method)
16009 *</pre>
16010 * The JD method is the most natural and convenient to use in
16011 * cases where the loss of several decimal digits of resolution
16012 * is acceptable. The J2000 method is best matched to the way
16013 * the argument is handled internally and will deliver the
16014 * optimum resolution. The MJD method and the date & time methods
16015 * are both good compromises between resolution and convenience.
16016 *
16017 * <li> The nutation components (luni-solar + planetary, IAU 2000B) in
16018 * longitude and obliquity are in radians and with respect to the
16019 * equinox and ecliptic of date. For more accurate results, but
16020 * at the cost of increased computation, use the jauPn00a function.
16021 * For the utmost accuracy, use the jauPn00 function, where the
16022 * nutation components are caller-specified.
16023 *
16024 * <li> The mean obliquity is consistent with the IAU 2000 precession.
16025 *
16026 * <li> The matrix rb transforms vectors from GCRS to J2000.0 mean
16027 * equator and equinox by applying frame bias.
16028 *
16029 * <li> The matrix rp transforms vectors from J2000.0 mean equator and
16030 * equinox to mean equator and equinox of date by applying
16031 * precession.
16032 *
16033 * <li> The matrix rbp transforms vectors from GCRS to mean equator and
16034 * equinox of date by applying frame bias then precession. It is
16035 * the product rp x rb.
16036 *
16037 * <li> The matrix rn transforms vectors from mean equator and equinox
16038 * of date to true equator and equinox of date by applying the
16039 * nutation (luni-solar + planetary).
16040 *
16041 * <li> The matrix rbpn transforms vectors from GCRS to true equator and
16042 * equinox of date. It is the product rn x rbp, applying frame
16043 * bias, precession and nutation in that order.
16044 *
16045 * <li> The X,Y,Z coordinates of the IAU 2000B Celestial Intermediate
16046 * Pole are elements (3,1-3) of the matrix rbpn.
16047 *
16048 * <li> It is permissible to re-use the same array in the returned
16049 * arguments. The arrays are filled in the stated order.
16050 *</ol>
16051 *<p>Called:<ul>
16052 * <li>{@link #jauNut00b} nutation, IAU 2000B
16053 * <li>{@link #jauPn00} bias/precession/nutation results, IAU 2000
16054 * </ul>
16055 *<p>Reference:
16056 *
16057 * <p>Capitaine, N., Chapront, J., Lambert, S. and Wallace, P.,
16058 * "Expressions for the Celestial Intermediate Pole and Celestial
16059 * Ephemeris Origin consistent with the IAU 2000A precession-
16060 * nutation model", Astron.Astrophys. 400, 1145-1154 (2003).
16061 *
16062 * n.b. The celestial ephemeris origin (CEO) was renamed "celestial
16063 * intermediate origin" (CIO) by IAU 2006 Resolution 2.
16064 *
16065 *@version 2010 January 18
16066 *
16067 * @since Release 20101201
16068 *
16069 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
16070 */
16071 public static PrecessionNutation jauPn00b(double date1, double date2)
16072 {
16073 /* Nutation. */
16074 NutationTerms nut = jauNut00b(date1, date2);
16075
16076 /* Remaining results. */
16077 return jauPn00(date1, date2, nut.dpsi, nut.deps);
16078
16079
16080 }
16081
16082
16083 /**
16084 * Precession-nutation, IAU 2006 model: a multi-purpose function,
16085 * supporting classical (equinox-based) use directly and CIO-based use
16086 * indirectly.
16087 *
16088 *<p>This function is derived from the International Astronomical Union's
16089 * SOFA (Standards Of Fundamental Astronomy) software collection.
16090 *
16091 *<p>Status: support function.
16092 *
16093 *<!-- Given: -->
16094 * @param date1 double TT as a 2-part Julian Date (Note 1)
16095 * @param date2 double TT as a 2-part Julian Date (Note 1)
16096 * @param dpsi double nutation (Note 2)
16097 * @param deps double nutation (Note 2)
16098 *
16099 *<!-- Returned: -->
16100 * @return epsa double <u>returned</u> mean obliquity (Note 3)
16101 * rb double[3][3] <u>returned</u> frame bias matrix (Note 4)
16102 * rp double[3][3] <u>returned</u> precession matrix (Note 5)
16103 * rbp double[3][3] <u>returned</u> bias-precession matrix (Note 6)
16104 * rn double[3][3] <u>returned</u> nutation matrix (Note 7)
16105 * rbpn double[3][3] <u>returned</u> GCRS-to-true matrix (Note 8)
16106 *
16107 * <p>Notes:
16108 * <ol>
16109 *
16110 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
16111 * convenient way between the two arguments. For example,
16112 * JD(TT)=2450123.7 could be expressed in any of these ways,
16113 * among others:
16114 *<pre>
16115 * date1 date2
16116 *
16117 * 2450123.7 0.0 (JD method)
16118 * 2451545.0 -1421.3 (J2000 method)
16119 * 2400000.5 50123.2 (MJD method)
16120 * 2450123.5 0.2 (date & time method)
16121 *</pre>
16122 * The JD method is the most natural and convenient to use in
16123 * cases where the loss of several decimal digits of resolution
16124 * is acceptable. The J2000 method is best matched to the way
16125 * the argument is handled internally and will deliver the
16126 * optimum resolution. The MJD method and the date & time methods
16127 * are both good compromises between resolution and convenience.
16128 *
16129 * <li> The caller is responsible for providing the nutation components;
16130 * they are in longitude and obliquity, in radians and are with
16131 * respect to the equinox and ecliptic of date. For high-accuracy
16132 * applications, free core nutation should be included as well as
16133 * any other relevant corrections to the position of the CIP.
16134 *
16135 * <li> The returned mean obliquity is consistent with the IAU 2006
16136 * precession.
16137 *
16138 * <li> The matrix rb transforms vectors from GCRS to J2000.0 mean
16139 * equator and equinox by applying frame bias.
16140 *
16141 * <li> The matrix rp transforms vectors from J2000.0 mean equator and
16142 * equinox to mean equator and equinox of date by applying
16143 * precession.
16144 *
16145 * <li> The matrix rbp transforms vectors from GCRS to mean equator and
16146 * equinox of date by applying frame bias then precession. It is
16147 * the product rp x rb.
16148 *
16149 * <li> The matrix rn transforms vectors from mean equator and equinox
16150 * of date to true equator and equinox of date by applying the
16151 * nutation (luni-solar + planetary).
16152 *
16153 * <li> The matrix rbpn transforms vectors from GCRS to true equator and
16154 * equinox of date. It is the product rn x rbp, applying frame
16155 * bias, precession and nutation in that order.
16156 *
16157 * <li> The X,Y,Z coordinates of the IAU 2000B Celestial Intermediate
16158 * Pole are elements (3,1-3) of the matrix rbpn.
16159 *
16160 * <li> It is permissible to re-use the same array in the returned
16161 * arguments. The arrays are filled in the stated order.
16162 *</ol>
16163 *<p>Called:<ul>
16164 * <li>{@link #jauPfw06} bias-precession F-W angles, IAU 2006
16165 * <li>{@link #jauFw2m} F-W angles to r-matrix
16166 * <li>{@link #jauCr} copy r-matrix
16167 * <li>{@link #jauTr} transpose r-matrix
16168 * <li>{@link #jauRxr} product of two r-matrices
16169 * </ul>
16170 *<p>References:
16171 *
16172 * <p>Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855
16173 *
16174 * <p>Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981
16175 *
16176 *@version 2009 December 17
16177 *
16178 * @since Release 20101201
16179 *
16180 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
16181 */
16182 public static PrecessionNutation jauPn06(double date1, double date2, double dpsi, double deps)
16183 {
16184
16185 double rb[][] = new double[3][3], rbp[][] = new double[3][3], rbpn[][] = new double[3][3];
16186 /* Bias-precession Fukushima-Williams angles of J2000.0 = frame bias. */
16187 FWPrecessionAngles fw = jauPfw06(DJM0, DJM00);
16188
16189 /* B matrix. */
16190 double[][] r1 = jauFw2m(fw.gamb, fw.phib, fw.psib, fw.epsa);
16191 jauCr(r1, rb);
16192
16193 /* Bias-precession Fukushima-Williams angles of date. */
16194 fw = jauPfw06(date1, date2);
16195
16196 /* Bias-precession matrix. */
16197 double[][] r2 = jauFw2m(fw.gamb, fw.phib, fw.psib, fw.epsa );
16198 jauCr(r2, rbp);
16199
16200 /* Solve for precession matrix. */
16201 double[][] rt = jauTr(r1);
16202 double[][] rp = jauRxr(r2, rt);
16203
16204 /* Equinox-based bias-precession-nutation matrix. */
16205 r1 = jauFw2m(fw.gamb, fw.phib, fw.psib + dpsi, fw.epsa + deps);
16206 jauCr(r1, rbpn);
16207
16208 /* Solve for nutation matrix. */
16209 rt = jauTr(r2);
16210 double[][] rn = jauRxr(r1, rt);
16211
16212 /* Obliquity, mean of date. */
16213 double epsa = fw.epsa;
16214
16215 return new PrecessionNutation(dpsi, deps, epsa, rb, rp, rbp, rn, rbpn);
16216
16217 }
16218
16219
16220 /**
16221 * Precession-nutation, IAU 2006/2000A models: a multi-purpose function,
16222 * supporting classical (equinox-based) use directly and CIO-based use
16223 * indirectly.
16224 *
16225 *<p>This function is derived from the International Astronomical Union's
16226 * SOFA (Standards Of Fundamental Astronomy) software collection.
16227 *
16228 *<p>Status: support function.
16229 *
16230 *<!-- Given: -->
16231 * @param date1 double TT as a 2-part Julian Date (Note 1)
16232 * @param date2 double TT as a 2-part Julian Date (Note 1)
16233 *
16234 *<!-- Returned: -->
16235 * @return dpsi,deps double <u>returned</u> nutation (Note 2)
16236 * epsa double <u>returned</u> mean obliquity (Note 3)
16237 * rb double[3][3] <u>returned</u> frame bias matrix (Note 4)
16238 * rp double[3][3] <u>returned</u> precession matrix (Note 5)
16239 * rbp double[3][3] <u>returned</u> bias-precession matrix (Note 6)
16240 * rn double[3][3] <u>returned</u> nutation matrix (Note 7)
16241 * rbpn double[3][3] <u>returned</u> GCRS-to-true matrix (Notes 8,9)
16242 *
16243 * <p>Notes:
16244 * <ol>
16245 *
16246 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
16247 * convenient way between the two arguments. For example,
16248 * JD(TT)=2450123.7 could be expressed in any of these ways,
16249 * among others:
16250 *<pre>
16251 * date1 date2
16252 *
16253 * 2450123.7 0.0 (JD method)
16254 * 2451545.0 -1421.3 (J2000 method)
16255 * 2400000.5 50123.2 (MJD method)
16256 * 2450123.5 0.2 (date & time method)
16257 *</pre>
16258 * The JD method is the most natural and convenient to use in
16259 * cases where the loss of several decimal digits of resolution
16260 * is acceptable. The J2000 method is best matched to the way
16261 * the argument is handled internally and will deliver the
16262 * optimum resolution. The MJD method and the date & time methods
16263 * are both good compromises between resolution and convenience.
16264 *
16265 * <li> The nutation components (luni-solar + planetary, IAU 2000A) in
16266 * longitude and obliquity are in radians and with respect to the
16267 * equinox and ecliptic of date. Free core nutation is omitted;
16268 * for the utmost accuracy, use the jauPn06 function, where the
16269 * nutation components are caller-specified.
16270 *
16271 * <li> The mean obliquity is consistent with the IAU 2006 precession.
16272 *
16273 * <li> The matrix rb transforms vectors from GCRS to mean J2000.0 by
16274 * applying frame bias.
16275 *
16276 * <li> The matrix rp transforms vectors from mean J2000.0 to mean of
16277 * date by applying precession.
16278 *
16279 * <li> The matrix rbp transforms vectors from GCRS to mean of date by
16280 * applying frame bias then precession. It is the product rp x rb.
16281 *
16282 * <li> The matrix rn transforms vectors from mean of date to true of
16283 * date by applying the nutation (luni-solar + planetary).
16284 *
16285 * <li> The matrix rbpn transforms vectors from GCRS to true of date
16286 * (CIP/equinox). It is the product rn x rbp, applying frame bias,
16287 * precession and nutation in that order.
16288 *
16289 * <li> The X,Y,Z coordinates of the IAU 2006/2000A Celestial
16290 * Intermediate Pole are elements (1,1-3) of the matrix rbpn.
16291 *
16292 * <li> It is permissible to re-use the same array in the returned
16293 * arguments. The arrays are filled in the stated order.
16294 *</ol>
16295 *<p>Called:<ul>
16296 * <li>{@link #jauNut06a} nutation, IAU 2006/2000A
16297 * <li>{@link #jauPn06} bias/precession/nutation results, IAU 2006
16298 * </ul>
16299 *<p>Reference:
16300 *
16301 * <p>Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855
16302 *
16303 *@version 2009 December 18
16304 *
16305 * @since Release 20101201
16306 *
16307 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
16308 */
16309 public static PrecessionNutation jauPn06a(double date1, double date2)
16310 {
16311 /* Nutation. */
16312 NutationTerms nut = jauNut06a(date1, date2);
16313
16314 /* Remaining results. */
16315 return jauPn06(date1, date2, nut.dpsi, nut.deps);
16316
16317 }
16318
16319
16320 /**
16321 * Form the matrix of precession-nutation for a given date (including
16322 * frame bias), equinox-based, IAU 2000A model.
16323 *
16324 *<p>This function is derived from the International Astronomical Union's
16325 * SOFA (Standards Of Fundamental Astronomy) software collection.
16326 *
16327 *<p>Status: support function.
16328 *
16329 *<!-- Given: -->
16330 * @param date1 double TT as a 2-part Julian Date (Note 1)
16331 * @param date2 double TT as a 2-part Julian Date (Note 1)
16332 *
16333 *<!-- Returned: -->
16334 * @return rbpn double[3][3] <u>returned</u> classical NPB matrix (Note 2)
16335 *
16336 * <p>Notes:
16337 * <ol>
16338 *
16339 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
16340 * convenient way between the two arguments. For example,
16341 * JD(TT)=2450123.7 could be expressed in any of these ways,
16342 * among others:
16343 *<pre>
16344 * date1 date2
16345 *
16346 * 2450123.7 0.0 (JD method)
16347 * 2451545.0 -1421.3 (J2000 method)
16348 * 2400000.5 50123.2 (MJD method)
16349 * 2450123.5 0.2 (date & time method)
16350 *</pre>
16351 * The JD method is the most natural and convenient to use in
16352 * cases where the loss of several decimal digits of resolution
16353 * is acceptable. The J2000 method is best matched to the way
16354 * the argument is handled internally and will deliver the
16355 * optimum resolution. The MJD method and the date & time methods
16356 * are both good compromises between resolution and convenience.
16357 *
16358 * <li> The matrix operates in the sense V(date) = rbpn * V(GCRS), where
16359 * the p-vector V(date) is with respect to the true equatorial triad
16360 * of date date1+date2 and the p-vector V(GCRS) is with respect to
16361 * the Geocentric Celestial Reference System (IAU, 2000).
16362 *
16363 * <li> A faster, but slightly less accurate result (about 1 mas), can be
16364 * obtained by using instead the jauPnm00b function.
16365 *</ol>
16366 *<p>Called:<ul>
16367 * <li>{@link #jauPn00a} bias/precession/nutation, IAU 2000A
16368 * </ul>
16369 *<p>Reference:
16370 *
16371 * IAU: Trans. International Astronomical Union, Vol. XXIVB; Proc.
16372 * 24th General Assembly, Manchester, UK. Resolutions B1.3, B1.6.
16373 * (2000)
16374 *
16375 *@version 2009 December 21
16376 *
16377 * @since Release 20101201
16378 *
16379 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
16380 */
16381 public static double[][] jauPnm00a(double date1, double date2)
16382 {
16383
16384 /* Obtain the required matrix (discarding other results). */
16385 PrecessionNutation pn = jauPn00a(date1, date2);
16386 return pn.rbpn;
16387
16388 }
16389
16390
16391 /**
16392 * Form the matrix of precession-nutation for a given date (including
16393 * frame bias), equinox-based, IAU 2000B model.
16394 *
16395 *<p>This function is derived from the International Astronomical Union's
16396 * SOFA (Standards Of Fundamental Astronomy) software collection.
16397 *
16398 *<p>Status: support function.
16399 *
16400 *<!-- Given: -->
16401 * @param date1 double TT as a 2-part Julian Date (Note 1)
16402 * @param date2 double TT as a 2-part Julian Date (Note 1)
16403 *
16404 *<!-- Returned: -->
16405 * @return rbpn double[3][3] <u>returned</u> bias-precession-nutation matrix (Note 2)
16406 *
16407 * <p>Notes:
16408 * <ol>
16409 *
16410 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
16411 * convenient way between the two arguments. For example,
16412 * JD(TT)=2450123.7 could be expressed in any of these ways,
16413 * among others:
16414 *<pre>
16415 * date1 date2
16416 *
16417 * 2450123.7 0.0 (JD method)
16418 * 2451545.0 -1421.3 (J2000 method)
16419 * 2400000.5 50123.2 (MJD method)
16420 * 2450123.5 0.2 (date & time method)
16421 *</pre>
16422 * The JD method is the most natural and convenient to use in
16423 * cases where the loss of several decimal digits of resolution
16424 * is acceptable. The J2000 method is best matched to the way
16425 * the argument is handled internally and will deliver the
16426 * optimum resolution. The MJD method and the date & time methods
16427 * are both good compromises between resolution and convenience.
16428 *
16429 * <li> The matrix operates in the sense V(date) = rbpn * V(GCRS), where
16430 * the p-vector V(date) is with respect to the true equatorial triad
16431 * of date date1+date2 and the p-vector V(GCRS) is with respect to
16432 * the Geocentric Celestial Reference System (IAU, 2000).
16433 *
16434 * <li> The present function is faster, but slightly less accurate (about
16435 * 1 mas), than the jauPnm00a function.
16436 *</ol>
16437 *<p>Called:<ul>
16438 * <li>{@link #jauPn00b} bias/precession/nutation, IAU 2000B
16439 * </ul>
16440 *<p>Reference:
16441 *
16442 * IAU: Trans. International Astronomical Union, Vol. XXIVB; Proc.
16443 * 24th General Assembly, Manchester, UK. Resolutions B1.3, B1.6.
16444 * (2000)
16445 *
16446 *@version 2009 December 21
16447 *
16448 * @since Release 20101201
16449 *
16450 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
16451 */
16452 public static double[][] jauPnm00b(double date1, double date2)
16453 {
16454
16455 /* Obtain the required matrix (discarding other results). */
16456 PrecessionNutation pn = jauPn00b(date1, date2);
16457
16458 return pn.rbpn;
16459
16460 }
16461
16462
16463 /**
16464 * Form the matrix of precession-nutation for a given date (including
16465 * frame bias), IAU 2006 precession and IAU 2000A nutation models.
16466 *
16467 *<p>This function is derived from the International Astronomical Union's
16468 * SOFA (Standards Of Fundamental Astronomy) software collection.
16469 *
16470 *<p>Status: support function.
16471 *
16472 *<!-- Given: -->
16473 * @param date1 double TT as a 2-part Julian Date (Note 1)
16474 * @param date2 double TT as a 2-part Julian Date (Note 1)
16475 *
16476 *<!-- Returned: -->
16477 * @return rnpb double[3][3] <u>returned</u> bias-precession-nutation matrix (Note 2)
16478 *
16479 * <p>Notes:
16480 * <ol>
16481 *
16482 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
16483 * convenient way between the two arguments. For example,
16484 * JD(TT)=2450123.7 could be expressed in any of these ways,
16485 * among others:
16486 *<pre>
16487 * date1 date2
16488 *
16489 * 2450123.7 0.0 (JD method)
16490 * 2451545.0 -1421.3 (J2000 method)
16491 * 2400000.5 50123.2 (MJD method)
16492 * 2450123.5 0.2 (date & time method)
16493 *</pre>
16494 * The JD method is the most natural and convenient to use in
16495 * cases where the loss of several decimal digits of resolution
16496 * is acceptable. The J2000 method is best matched to the way
16497 * the argument is handled internally and will deliver the
16498 * optimum resolution. The MJD method and the date & time methods
16499 * are both good compromises between resolution and convenience.
16500 *
16501 * <li> The matrix operates in the sense V(date) = rnpb * V(GCRS), where
16502 * the p-vector V(date) is with respect to the true equatorial triad
16503 * of date date1+date2 and the p-vector V(GCRS) is with respect to
16504 * the Geocentric Celestial Reference System (IAU, 2000).
16505 *</ol>
16506 *<p>Called:<ul>
16507 * <li>{@link #jauPfw06} bias-precession F-W angles, IAU 2006
16508 * <li>{@link #jauNut06a} nutation, IAU 2006/2000A
16509 * <li>{@link #jauFw2m} F-W angles to r-matrix
16510 * </ul>
16511 *<p>Reference:
16512 *
16513 * <p>Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855.
16514 *
16515 *@version 2009 December 21
16516 *
16517 * @since Release 20101201
16518 *
16519 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
16520 */
16521 public static double[][] jauPnm06a(double date1, double date2)
16522 {
16523
16524 /* Fukushima-Williams angles for frame bias and precession. */
16525 FWPrecessionAngles fw = jauPfw06(date1, date2);
16526
16527 /* Nutation components. */
16528 NutationTerms nut = jauNut06a(date1, date2);
16529
16530 /* Equinox based nutation x precession x bias matrix. */
16531 double[][] rnpb = jauFw2m(fw.gamb, fw.phib, fw.psib + nut.dpsi, fw.epsa + nut.deps);
16532
16533 return rnpb;
16534
16535 }
16536
16537
16538 /**
16539 * Form the matrix of precession/nutation for a given date, IAU 1976
16540 * precession model, IAU 1980 nutation model.
16541 *
16542 *<p>This function is derived from the International Astronomical Union's
16543 * SOFA (Standards Of Fundamental Astronomy) software collection.
16544 *
16545 *<p>Status: support function.
16546 *
16547 *<!-- Given: -->
16548 * @param date1 double TDB date (Note 1)
16549 * @param date2 double TDB date (Note 1)
16550 *
16551 *<!-- Returned: -->
16552 * @return rmatpn double[3][3] <u>returned</u> combined precession/nutation matrix
16553 *
16554 * <p>Notes:
16555 * <ol>
16556 *
16557 * <li> The TDB date date1+date2 is a Julian Date, apportioned in any
16558 * convenient way between the two arguments. For example,
16559 * JD(TDB)=2450123.7 could be expressed in any of these ways,
16560 * among others:
16561 *<pre>
16562 * date1 date2
16563 *
16564 * 2450123.7 0.0 (JD method)
16565 * 2451545.0 -1421.3 (J2000 method)
16566 * 2400000.5 50123.2 (MJD method)
16567 * 2450123.5 0.2 (date & time method)
16568 *</pre>
16569 * The JD method is the most natural and convenient to use in
16570 * cases where the loss of several decimal digits of resolution
16571 * is acceptable. The J2000 method is best matched to the way
16572 * the argument is handled internally and will deliver the
16573 * optimum resolution. The MJD method and the date & time methods
16574 * are both good compromises between resolution and convenience.
16575 *
16576 * <li> The matrix operates in the sense V(date) = rmatpn * V(J2000),
16577 * where the p-vector V(date) is with respect to the true equatorial
16578 * triad of date date1+date2 and the p-vector V(J2000) is with
16579 * respect to the mean equatorial triad of epoch J2000.0.
16580 *</ol>
16581 *<p>Called:<ul>
16582 * <li>{@link #jauPmat76} precession matrix, IAU 1976
16583 * <li>{@link #jauNutm80} nutation matrix, IAU 1980
16584 * <li>{@link #jauRxr} product of two r-matrices
16585 * </ul>
16586 *<p>Reference:
16587 *
16588 * <p>Explanatory Supplement to the Astronomical Almanac,
16589 * P. Kenneth Seidelmann (ed), University Science Books (1992),
16590 * Section 3.3 (p145).
16591 *
16592 *@version 2010 January 23
16593 *
16594 * @since Release 20101201
16595 *
16596 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
16597 */
16598 public static double[][] jauPnm80(double date1, double date2)
16599 {
16600 double rmatp[][] = new double[3][3], rmatn[][] = new double[3][3];
16601
16602
16603 /* Precession matrix, J2000.0 to date. */
16604 rmatp = jauPmat76(date1, date2 );
16605
16606 /* Nutation matrix. */
16607 rmatn = jauNutm80(date1, date2);
16608
16609 /* Combine the matrices: PN = N x P. */
16610 double[][] rmatpn = jauRxr(rmatn, rmatp);
16611
16612 return rmatpn;
16613
16614 }
16615
16616
16617 /**
16618 * Form the matrix of polar motion for a given date, IAU 2000.
16619 *
16620 *<p>This function is derived from the International Astronomical Union's
16621 * SOFA (Standards Of Fundamental Astronomy) software collection.
16622 *
16623 *<p>Status: support function.
16624 *
16625 *<!-- Given: -->
16626 * @param xp double coordinates of the pole (radians, Note 1)
16627 * @param yp double coordinates of the pole (radians, Note 1)
16628 * @param sp double the TIO locator s' (radians, Note 2)
16629 *
16630 *<!-- Returned: -->
16631 * @return double[3][3] <u>returned</u> polar-motion matrix (Note 3)
16632 *
16633 * <p>Notes:
16634 * <ol>
16635 *
16636 * <li> The arguments xp and yp are the coordinates (in radians) of the
16637 * Celestial Intermediate Pole with respect to the International
16638 * Terrestrial Reference System (see IERS Conventions 2003),
16639 * measured along the meridians to 0 and 90 deg west respectively.
16640 *
16641 * <li> The argument sp is the TIO locator s', in radians, which
16642 * positions the Terrestrial Intermediate Origin on the equator. It
16643 * is obtained from polar motion observations by numerical
16644 * integration, and so is in essence unpredictable. However, it is
16645 * dominated by a secular drift of about 47 microarcseconds per
16646 * century, and so can be taken into account by using s' = -47*t,
16647 * where t is centuries since J2000.0. The function jauSp00
16648 * implements this approximation.
16649 *
16650 * <li> The matrix operates in the sense V(TRS) = rpom * V(CIP), meaning
16651 * that it is the final rotation when computing the pointing
16652 * direction to a celestial source.
16653 *</ol>
16654 *<p>Called:<ul>
16655 * <li>{@link #jauIr} initialize r-matrix to identity
16656 * <li>{@link #jauRz} rotate around Z-axis
16657 * <li>{@link #jauRy} rotate around Y-axis
16658 * <li>{@link #jauRx} rotate around X-axis
16659 * </ul>
16660 *<p>Reference:
16661 *
16662 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
16663 * IERS Technical Note No. 32, BKG (2004)
16664 *
16665 *@version 2009 December 17
16666 *
16667 * @since Release 20101201
16668 *
16669 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
16670 */
16671 public static double[][] jauPom00(double xp, double yp, double sp)
16672 {
16673
16674 /* Construct the matrix. */
16675 double rpom[][] = new double[3][3];
16676 jauIr(rpom);
16677 jauRz(sp, rpom);
16678 jauRy(-xp, rpom);
16679 jauRx(-yp, rpom);
16680
16681 return rpom;
16682
16683 }
16684
16685
16686 /**
16687 * P-vector addition.
16688 *
16689 *<p>This function is derived from the International Astronomical Union's
16690 * SOFA (Standards Of Fundamental Astronomy) software collection.
16691 *
16692 *<p>Status: vector/matrix support function.
16693 *
16694 *<!-- Given: -->
16695 * @param a double[3] first p-vector
16696 * @param b double[3] second p-vector
16697 *
16698 *<!-- Returned: -->
16699 * @return apb double[3] <u>returned</u> a + b
16700 *
16701 * Note:
16702 * It is permissible to re-use the same array for any of the
16703 * arguments.
16704 *
16705 *@version 2008 November 18
16706 *
16707 * @since Release 20101201
16708 *
16709 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
16710 */
16711 public static double[] jauPpp(double a[] , double b[] )
16712 {
16713 double apb[] = new double[3];
16714 apb[0] = a[0] + b[0];
16715 apb[1] = a[1] + b[1];
16716 apb[2] = a[2] + b[2];
16717
16718 return apb;
16719
16720 }
16721
16722
16723 /**
16724 * P-vector plus scaled p-vector.
16725 *
16726 *<p>This function is derived from the International Astronomical Union's
16727 * SOFA (Standards Of Fundamental Astronomy) software collection.
16728 *
16729 *<p>Status: vector/matrix support function.
16730 *
16731 *<!-- Given: -->
16732 * @param a double[3] first p-vector
16733 * @param s double scalar (multiplier for b)
16734 * @param b double[3] second p-vector
16735 *
16736 *<!-- Returned: -->
16737 * @return apsb double[3] <u>returned</u> a + s*b
16738 *
16739 * Note:
16740 * It is permissible for any of a, b and apsb to be the same array.
16741 *
16742 *<p>Called:<ul>
16743 * <li>{@link #jauSxp} multiply p-vector by scalar
16744 * <li>{@link #jauPpp} p-vector plus p-vector
16745 * </ul>
16746 *@version 2008 November 18
16747 *
16748 * @since Release 20101201
16749 *
16750 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
16751 */
16752 static double[] jauPpsp(double a[] , double s, double b[] )
16753 {
16754 double sb[] = new double[3], apsb[];
16755
16756
16757 /* s*b. */
16758 sb = jauSxp(s,b);
16759
16760 /* a + s*b. */
16761 apsb = jauPpp(a, sb);
16762
16763 return apsb;
16764
16765 }
16766
16767 /**
16768 * Precession correction terms.
16769 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
16770 *
16771 * @since AIDA Stage 1
16772 */
16773 public static class PrecessionDeltaTerms {
16774 /** precession correction in longitude */
16775 public double dpsipr;
16776 /** precession correction in obliquity */
16777 public double depspr;
16778 public PrecessionDeltaTerms(double dpsipr, double depspr) {
16779 this.dpsipr = dpsipr;
16780 this.depspr = depspr;
16781 }
16782 }
16783
16784 /**
16785 * Precession-rate part of the IAU 2000 precession-nutation models
16786 * (part of MHB2000).
16787 *
16788 *<p>This function is derived from the International Astronomical Union's
16789 * SOFA (Standards Of Fundamental Astronomy) software collection.
16790 *
16791 *<p>Status: canonical model.
16792 *
16793 *<!-- Given: -->
16794 * @param date1 double TT as a 2-part Julian Date (Note 1)
16795 * @param date2 double TT as a 2-part Julian Date (Note 1)
16796 *
16797 *<!-- Returned: -->
16798 * @param dpsipr double <u>returned</u> precession corrections (Notes 2,3)
16799 * @param depspr double <u>returned</u> precession corrections (Notes 2,3)
16800 *
16801 * <p>Notes:
16802 * <ol>
16803 *
16804 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
16805 * convenient way between the two arguments. For example,
16806 * JD(TT)=2450123.7 could be expressed in any of these ways,
16807 * among others:
16808 *<pre>
16809 * date1 date2
16810 *
16811 * 2450123.7 0.0 (JD method)
16812 * 2451545.0 -1421.3 (J2000 method)
16813 * 2400000.5 50123.2 (MJD method)
16814 * 2450123.5 0.2 (date & time method)
16815 *</pre>
16816 * The JD method is the most natural and convenient to use in
16817 * cases where the loss of several decimal digits of resolution
16818 * is acceptable. The J2000 method is best matched to the way
16819 * the argument is handled internally and will deliver the
16820 * optimum resolution. The MJD method and the date & time methods
16821 * are both good compromises between resolution and convenience.
16822 *
16823 * <li> The precession adjustments are expressed as "nutation
16824 * components", corrections in longitude and obliquity with respect
16825 * to the J2000.0 equinox and ecliptic.
16826 *
16827 * <li> Although the precession adjustments are stated to be with respect
16828 * to Lieske et al. (1977), the MHB2000 model does not specify which
16829 * set of Euler angles are to be used and how the adjustments are to
16830 * be applied. The most literal and straightforward procedure is to
16831 * adopt the 4-rotation epsilon_0, psi_A, omega_A, xi_A option, and
16832 * to add dpsipr to psi_A and depspr to both omega_A and eps_A.
16833 *
16834 * <li> This is an implementation of one aspect of the IAU 2000A nutation
16835 * model, formally adopted by the IAU General Assembly in 2000,
16836 * namely MHB2000 (Mathews et al. 2002).
16837 *
16838 *<p>References:
16839 *
16840 * <p>Lieske, J.H., Lederle, T., Fricke, W. & Morando, B., "Expressions
16841 * for the precession quantities based upon the IAU (1976) System of
16842 * Astronomical Constants", Astron.Astrophys., 58, 1-16 (1977)
16843 *
16844 * <p>Mathews, P.M., Herring, T.A., Buffet, B.A., "Modeling of nutation
16845 * and precession New nutation series for nonrigid Earth and
16846 * insights into the Earth's interior", J.Geophys.Res., 107, B4,
16847 * 2002. The MHB2000 code itself was obtained on 9th September 2002
16848 * from ftp://maia.usno.navy.mil/conv2000/chapter5/IAU2000A.
16849 *
16850 * <p>Wallace, P.T., "Software for Implementing the IAU 2000
16851 * Resolutions", in IERS Workshop 5.1 (2002).
16852 *
16853 *@version 2009 December 17
16854 *
16855 * @since Release 20101201
16856 *
16857 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
16858 */
16859 static PrecessionDeltaTerms jauPr00(double date1, double date2)
16860 {
16861 double t;
16862
16863 /* Precession and obliquity corrections (radians per century) */
16864 final double PRECOR = -0.29965 * DAS2R,
16865 OBLCOR = -0.02524 * DAS2R;
16866
16867
16868 /* Interval between fundamental epoch J2000.0 and given date (JC). */
16869 t = ((date1 - DJ00) + date2) / DJC;
16870
16871 /* Precession rate contributions with respect to IAU 1976/80. */
16872 double dpsipr = PRECOR * t;
16873 double depspr = OBLCOR * t;
16874
16875 return new PrecessionDeltaTerms(dpsipr, depspr);
16876
16877 }
16878
16879 /**
16880 * Euler Angles.
16881 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
16882 *
16883 * @since AIDA Stage 1
16884 */
16885 public static class EulerAngles {
16886 /** 1st rotation: radians cw around z */
16887 public double zeta;
16888 /** 3rd rotation: radians cw around z */
16889 public double z;
16890 /** 2nd rotation: radians ccw around y */
16891 public double theta;
16892 public EulerAngles(double zeta, double z, double theta){
16893 this.zeta = zeta;
16894 this.z = z;
16895 this.theta = theta;
16896 }
16897 }
16898
16899 /**
16900 * IAU 1976 precession model.
16901 *
16902 * This function forms the three Euler angles which implement general
16903 * precession between two epochs, using the IAU 1976 model (as for
16904 * the FK5 catalog).
16905 *
16906 *<p>This function is derived from the International Astronomical Union's
16907 * SOFA (Standards Of Fundamental Astronomy) software collection.
16908 *
16909 *<p>Status: canonical model.
16910 *
16911 *<!-- Given: -->
16912 * @param ep01 double TDB starting epoch (Note 1)
16913 * @param ep02 double TDB starting epoch (Note 1)
16914 * @param ep11 double TDB ending epoch (Note 1)
16915 * @param ep12 double TDB ending epoch (Note 1)
16916 *
16917 *<!-- Returned: -->
16918 * @param zeta double <u>returned</u> 1st rotation: radians cw around z
16919 * @param z double <u>returned</u> 3rd rotation: radians cw around z
16920 * @param theta double <u>returned</u> 2nd rotation: radians ccw around y
16921 *
16922 * <p>Notes:
16923 * <ol>
16924 *
16925 * <li> The epochs ep01+ep02 and ep11+ep12 are Julian Dates, apportioned
16926 * in any convenient way between the arguments epn1 and epn2. For
16927 * example, JD(TDB)=2450123.7 could be expressed in any of these
16928 * ways, among others:
16929 *
16930 * epn1 epn2
16931 *
16932 * 2450123.7 0.0 (JD method)
16933 * 2451545.0 -1421.3 (J2000 method)
16934 * 2400000.5 50123.2 (MJD method)
16935 * 2450123.5 0.2 (date & time method)
16936 *</pre>
16937 * The JD method is the most natural and convenient to use in cases
16938 * where the loss of several decimal digits of resolution is
16939 * acceptable. The J2000 method is best matched to the way the
16940 * argument is handled internally and will deliver the optimum
16941 * optimum resolution. The MJD method and the date & time methods
16942 * are both good compromises between resolution and convenience.
16943 * The two epochs may be expressed using different methods, but at
16944 * the risk of losing some resolution.
16945 *
16946 * <li> The accumulated precession angles zeta, z, theta are expressed
16947 * through canonical polynomials which are valid only for a limited
16948 * time span. In addition, the IAU 1976 precession rate is known to
16949 * be imperfect. The absolute accuracy of the present formulation
16950 * is better than 0.1 arcsec from 1960AD to 2040AD, better than
16951 * 1 arcsec from 1640AD to 2360AD, and remains below 3 arcsec for
16952 * the whole of the period 500BC to 3000AD. The errors exceed
16953 * 10 arcsec outside the range 1200BC to 3900AD, exceed 100 arcsec
16954 * outside 4200BC to 5600AD and exceed 1000 arcsec outside 6800BC to
16955 * 8200AD.
16956 *
16957 * <li> The three angles are returned in the conventional order, which
16958 * is not the same as the order of the corresponding Euler
16959 * rotations. The precession matrix is
16960 * R_3(-z) x R_2(+theta) x R_3(-zeta).
16961 *
16962 *<p>Reference:
16963 *
16964 * <p>Lieske, J.H., 1979, Astron.Astrophys. 73, 282, equations
16965 * (6) & (7), p283.
16966 *
16967 *@version 2009 December 17
16968 *
16969 * @since Release 20101201
16970 *
16971 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
16972 */
16973 static EulerAngles jauPrec76(double ep01, double ep02, double ep11, double ep12)
16974 {
16975 double t0, t, tas2r, w;
16976
16977
16978 /* Interval between fundamental epoch J2000.0 and start epoch (JC). */
16979 t0 = ((ep01 - DJ00) + ep02) / DJC;
16980
16981 /* Interval over which precession required (JC). */
16982 t = ((ep11 - ep01) + (ep12 - ep02)) / DJC;
16983
16984 /* Euler angles. */
16985 tas2r = t * DAS2R;
16986 w = 2306.2181 + (1.39656 - 0.000139 * t0) * t0;
16987
16988 double zeta = (w + ((0.30188 - 0.000344 * t0) + 0.017998 * t) * t) * tas2r;
16989
16990 double z = (w + ((1.09468 + 0.000066 * t0) + 0.018203 * t) * t) * tas2r;
16991
16992 double theta = ((2004.3109 + (-0.85330 - 0.000217 * t0) * t0)
16993 + ((-0.42665 - 0.000217 * t0) - 0.041833 * t) * t) * tas2r;
16994
16995 return new EulerAngles(zeta, z, theta);
16996
16997 }
16998
16999
17000 /**
17001 * Discard velocity component of a pv-vector.
17002 *
17003 *<p>This function is derived from the International Astronomical Union's
17004 * SOFA (Standards Of Fundamental Astronomy) software collection.
17005 *
17006 *<p>Status: vector/matrix support function.
17007 *
17008 *<!-- Given: -->
17009 * @param pv double[2][3] pv-vector
17010 *
17011 *<!-- Returned: -->
17012 * @return p double[3] <u>returned</u> p-vector
17013 *
17014 *<p>Called:<ul>
17015 * <li>{@link #jauCp} copy p-vector
17016 * </ul>
17017 *@version 2008 May 11
17018 *
17019 * @since Release 20101201
17020 *
17021 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
17022 */
17023 public static double[] jauPv2p(double pv[][] )
17024 {
17025 double p[] = new double[3];
17026 jauCp(pv[0], p);
17027
17028 return p;
17029
17030 }
17031
17032
17033 /**
17034 * A position and velocity expressed in spherical polar coordinates.
17035 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
17036 *
17037 * @since AIDA Stage 1
17038 */
17039 public static class SphericalPositionVelocity {
17040 public SphericalPosition pos;
17041 public SphericalPosition vel;
17042 public SphericalPositionVelocity( double theta, double phi, double r,
17043 double td, double pd, double rd) {
17044 pos = new SphericalPosition(theta, phi, r);
17045 vel = new SphericalPosition(td,pd,rd);
17046 }
17047 }
17048 /**
17049 * Convert position/velocity from Cartesian to spherical coordinates.
17050 *
17051 *<p>This function is derived from the International Astronomical Union's
17052 * SOFA (Standards Of Fundamental Astronomy) software collection.
17053 *
17054 *<p>Status: vector/matrix support function.
17055 *
17056 *<!-- Given: -->
17057 * @param pv double[2][3] pv-vector
17058 *
17059 *<!-- Returned: -->
17060 * @return theta double <u>returned</u> longitude angle (radians)
17061 * phi double <u>returned</u> latitude angle (radians)
17062 * r double <u>returned</u> radial distance
17063 * td double <u>returned</u> rate of change of theta
17064 * pd double <u>returned</u> rate of change of phi
17065 * rd double <u>returned</u> rate of change of r
17066 *
17067 * <p>Notes:
17068 * <ol>
17069 *
17070 * <li> If the position part of pv is null, theta, phi, td and pd
17071 * are indeterminate. This is handled by extrapolating the
17072 * position through unit time by using the velocity part of
17073 * pv. This moves the origin without changing the direction
17074 * of the velocity component. If the position and velocity
17075 * components of pv are both null, zeroes are returned for all
17076 * six results.
17077 *
17078 * <li> If the position is a pole, theta, td and pd are indeterminate.
17079 * In such cases zeroes are returned for all three.
17080 *</ol>
17081 *@version 2008 October 28
17082 *
17083 * @since Release 20101201
17084 *
17085 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
17086 */
17087 public static SphericalPositionVelocity jauPv2s(double pv[][])
17088 {
17089 double x, y, z, xd, yd, zd, rxy2, rxy, r2, rtrue, rw, xyp;
17090 double theta, phi, r, td, pd, rd;
17091
17092 /* Components of position/velocity vector. */
17093 x = pv[0][0];
17094 y = pv[0][1];
17095 z = pv[0][2];
17096 xd = pv[1][0];
17097 yd = pv[1][1];
17098 zd = pv[1][2];
17099
17100 /* Component of r in XY plane squared. */
17101 rxy2 = x*x + y*y;
17102
17103 /* Modulus squared. */
17104 r2 = rxy2 + z*z;
17105
17106 /* Modulus. */
17107 rtrue = sqrt(r2);
17108
17109 /* If null vector, move the origin along the direction of movement. */
17110 rw = rtrue;
17111 if (rtrue == 0.0) {
17112 x = xd;
17113 y = yd;
17114 z = zd;
17115 rxy2 = x*x + y*y;
17116 r2 = rxy2 + z*z;
17117 rw = sqrt(r2);
17118 }
17119
17120 /* Position and velocity in spherical coordinates. */
17121 rxy = sqrt(rxy2);
17122 xyp = x*xd + y*yd;
17123 if (rxy2 != 0.0) {
17124 theta = atan2(y, x);
17125 phi = atan2(z, rxy);
17126 td = (x*yd - y*xd) / rxy2;
17127 pd = (zd*rxy2 - z*xyp) / (r2*rxy);
17128 } else {
17129 theta = 0.0;
17130 phi = (z != 0.0) ? atan2(z, rxy) : 0.0;
17131 td = 0.0;
17132 pd = 0.0;
17133 }
17134 r = rtrue;
17135 rd = (rw != 0.0) ? (xyp + z*zd) / rw : 0.0;
17136
17137 return new SphericalPositionVelocity(theta, phi, r, td, pd, rd);
17138
17139 }
17140
17141
17142 /**
17143 * Inner (=scalar=dot) product of two pv-vectors.
17144 *
17145 *<p>This function is derived from the International Astronomical Union's
17146 * SOFA (Standards Of Fundamental Astronomy) software collection.
17147 *
17148 *<p>Status: vector/matrix support function.
17149 *
17150 *<!-- Given: -->
17151 * @param a double[2][3] first pv-vector
17152 * @param b double[2][3] second pv-vector
17153 *
17154 *<!-- Returned: -->
17155 * @return adb double[2] <u>returned</u> a . b (see note)
17156 *
17157 * Note:
17158 *
17159 * If the position and velocity components of the two pv-vectors are
17160 * ( ap, av ) and ( bp, bv ), the result, a . b, is the pair of
17161 * numbers ( ap . bp , ap . bv + av . bp ). The two numbers are the
17162 * dot-product of the two p-vectors and its derivative.
17163 *
17164 *<p>Called:<ul>
17165 * <li>{@link #jauPdp} scalar product of two p-vectors
17166 * </ul>
17167 *@version 2008 May 22
17168 *
17169 * @since Release 20101201
17170 *
17171 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
17172 */
17173 public static double[] jauPvdpv(double a[][], double b[][] )
17174 {
17175 double adbd, addb, adb[] = new double[2];
17176
17177
17178 /* a . b = constant part of result. */
17179 adb[0] = jauPdp(a[0], b[0]);
17180
17181 /* a . bdot */
17182 adbd = jauPdp(a[0], b[1]);
17183
17184 /* adot . b */
17185 addb = jauPdp(a[1], b[0]);
17186
17187 /* Velocity part of result. */
17188 adb[1] = adbd + addb;
17189
17190 return adb;
17191
17192 }
17193
17194
17195 /**
17196 * Modulus of pv-vector.
17197 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
17198 *
17199 * @since AIDA Stage 1
17200 */
17201 public static class PVModulus{
17202 public double r;
17203 public double s;
17204 public PVModulus( double r, double s){
17205 this.r = r;
17206 this.s = s;
17207 }
17208 }
17209 /**
17210 * Modulus of pv-vector.
17211 *
17212 *<p>This function is derived from the International Astronomical Union's
17213 * SOFA (Standards Of Fundamental Astronomy) software collection.
17214 *
17215 *<p>Status: vector/matrix support function.
17216 *
17217 *<!-- Given: -->
17218 * @param pv double[2][3] pv-vector
17219 *
17220 *<!-- Returned: -->
17221 * @return modulus of position component,
17222 * modulus of velocity component
17223 *
17224 *<p>Called:<ul>
17225 * <li>{@link #jauPm} modulus of p-vector
17226 * </ul>
17227 *@version 2008 May 22
17228 *
17229 * @since Release 20101201
17230 *
17231 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
17232 */
17233 public static PVModulus jauPvm(double pv[][])
17234 {
17235 /* Distance. */
17236 double r = jauPm(pv[0]);
17237
17238 /* Speed. */
17239 double s = jauPm(pv[1]);
17240
17241 return new PVModulus(r, s);
17242
17243 }
17244
17245
17246 /**
17247 * Subtract one pv-vector from another.
17248 *
17249 *<p>This function is derived from the International Astronomical Union's
17250 * SOFA (Standards Of Fundamental Astronomy) software collection.
17251 *
17252 *<p>Status: vector/matrix support function.
17253 *
17254 *<!-- Given: -->
17255 * @param a double[2][3] first pv-vector
17256 * @param b double[2][3] second pv-vector
17257 *
17258 *<!-- Returned: -->
17259 * @return double[2][3] <u>returned</u> a - b
17260 *
17261 * Note:
17262 * It is permissible to re-use the same array for any of the
17263 * arguments.
17264 *
17265 *<p>Called:<ul>
17266 * <li>{@link #jauPmp} p-vector minus p-vector
17267 * </ul>
17268 *@version 2008 November 18
17269 *
17270 * @since Release 20101201
17271 *
17272 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
17273 */
17274 public static double[][] jauPvmpv(double a[][], double b[][])
17275 {
17276 double amb[][] = new double[2][3];
17277 amb[0] = jauPmp(a[0], b[0]);
17278 amb[1] = jauPmp(a[1], b[1]);
17279
17280 return amb;
17281
17282 }
17283
17284
17285 /**
17286 * Add one pv-vector to another.
17287 *
17288 *<p>This function is derived from the International Astronomical Union's
17289 * SOFA (Standards Of Fundamental Astronomy) software collection.
17290 *
17291 *<p>Status: vector/matrix support function.
17292 *
17293 *<!-- Given: -->
17294 * @param a double[2][3] first pv-vector
17295 * @param b double[2][3] second pv-vector
17296 *
17297 *<!-- Returned: -->
17298 * @return apb double[2][3] <u>returned</u> a + b
17299 *
17300 * Note:
17301 * It is permissible to re-use the same array for any of the
17302 * arguments.
17303 *
17304 *<p>Called:<ul>
17305 * <li>{@link #jauPpp} p-vector plus p-vector
17306 * </ul>
17307 *@version 2008 November 18
17308 *
17309 * @since Release 20101201
17310 *
17311 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
17312 */
17313 public static double[][] jauPvppv(double a[][], double b[][])
17314 {
17315 double apb[][] = new double[2][3];
17316 apb[0] = jauPpp(a[0], b[0]);
17317 apb[1] = jauPpp(a[1], b[1]);
17318
17319 return apb;
17320
17321 }
17322
17323
17324 /**
17325 * Typical catalogue coordinates. i.e. Position, proper motion, parallax and radial velocity.
17326 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 4 Feb 2010
17327 *
17328 * @since AIDA Stage 1
17329 */
17330 public static class CatalogCoords {
17331 /** position (radians) */
17332 public SphericalCoordinate pos;
17333 /** proper motion (radians/year)*/
17334 public SphericalCoordinate pm;
17335 /** parallax (arcsec) */
17336 public double px;
17337 /** radial velocity (km/s, positive = receding) */
17338 public double rv;
17339
17340 public CatalogCoords(double ra, double dec,
17341 double pmr, double pmd, double px, double rv) {
17342 this.pos = new SphericalCoordinate(ra, dec);
17343 this.pm = new SphericalCoordinate(pmr, pmd);
17344 this.px = px;
17345 this.rv = rv;
17346 }
17347 }
17348 /**
17349 * Convert star position+velocity vector to catalog coordinates.
17350 *
17351 *<p>This function is derived from the International Astronomical Union's
17352 * SOFA (Standards Of Fundamental Astronomy) software collection.
17353 *
17354 *<p>Status: support function.
17355 *
17356 * Given (Note 1):
17357 * @param pv double[2][3] pv-vector (au, au/day)
17358 *
17359 *
17360 * <!-- Returned (function value): -->
17361 * @return catalogue value
17362 *
17363 * int status:
17364 * 0 = OK
17365 * -1 = superluminal speed (Note 5)
17366 * -2 = null position vector
17367 *
17368 * <p>Notes:
17369 * <ol>
17370 *
17371 * <li> The specified pv-vector is the coordinate direction (and its rate
17372 * of change) for the date at which the light leaving the star
17373 * reached the solar-system barycenter.
17374 *
17375 * <li> The star data returned by this function are "observables" for an
17376 * imaginary observer at the solar-system barycenter. Proper motion
17377 * and radial velocity are, strictly, in terms of barycentric
17378 * coordinate time, TCB. For most practical applications, it is
17379 * permissible to neglect the distinction between TCB and ordinary
17380 * "proper" time on Earth (TT/TAI). The result will, as a rule, be
17381 * limited by the intrinsic accuracy of the proper-motion and
17382 * radial-velocity data; moreover, the supplied pv-vector is likely
17383 * to be merely an intermediate result (for example generated by the
17384 * function jauStarpv), so that a change of time unit will cancel
17385 * out overall.
17386 *
17387 * In accordance with normal star-catalog conventions, the object's
17388 * right ascension and declination are freed from the effects of
17389 * secular aberration. The frame, which is aligned to the catalog
17390 * equator and equinox, is Lorentzian and centered on the SSB.
17391 *
17392 * Summarizing, the specified pv-vector is for most stars almost
17393 * identical to the result of applying the standard geometrical
17394 * "space motion" transformation to the catalog data. The
17395 * differences, which are the subject of the Stumpff paper cited
17396 * below, are:
17397 *
17398 * (i) In stars with significant radial velocity and proper motion,
17399 * the constantly changing light-time distorts the apparent proper
17400 * motion. Note that this is a classical, not a relativistic,
17401 * effect.
17402 *
17403 * (ii) The transformation complies with special relativity.
17404 *
17405 * <li> Care is needed with units. The star coordinates are in radians
17406 * and the proper motions in radians per Julian year, but the
17407 * parallax is in arcseconds; the radial velocity is in km/s, but
17408 * the pv-vector result is in au and au/day.
17409 *
17410 * <li> The proper motions are the rate of change of the right ascension
17411 * and declination at the catalog epoch and are in radians per Julian
17412 * year. The RA proper motion is in terms of coordinate angle, not
17413 * true angle, and will thus be numerically larger at high
17414 * declinations.
17415 *
17416 * <li> Straight-line motion at constant speed in the inertial frame is
17417 * assumed. If the speed is greater than or equal to the speed of
17418 * light, the function aborts with an error status.
17419 *
17420 * <li> The inverse transformation is performed by the function jauStarpv.
17421 *</ol>
17422 *<p>Called:<ul>
17423 * <li>{@link #jauPn} decompose p-vector into modulus and direction
17424 * <li>{@link #jauPdp} scalar product of two p-vectors
17425 * <li>{@link #jauSxp} multiply p-vector by scalar
17426 * <li>{@link #jauPmp} p-vector minus p-vector
17427 * <li>{@link #jauPm} modulus of p-vector
17428 * <li>{@link #jauPpp} p-vector plus p-vector
17429 * <li>{@link #jauPv2s} pv-vector to spherical
17430 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
17431 * </ul>
17432 *<p>Reference:
17433 *
17434 * Stumpff, P., 1985, Astron.Astrophys. 144, 232-240.
17435 *
17436 *@version 2017 May 30
17437 *
17438 * @since Release 20101201
17439 *
17440 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
17441 */
17442 public static CatalogCoords jauPvstar(double pv[][]) throws JSOFAInternalError
17443 {
17444 double x[] = new double[3], vr, ur[] = new double[3], vt, ut[] = new double[3], bett, betr, d, w, del,
17445 usr[] = new double[3], ust[] = new double[3];
17446
17447
17448 /* Isolate the radial component of the velocity (au/day, inertial). */
17449 NormalizedVector nv = jauPn(pv[0]);
17450 x = nv.u;
17451 vr = jauPdp(x, pv[1]);
17452 ur = jauSxp(vr,x);
17453
17454 /* Isolate the transverse component of the velocity (au/day, inertial). */
17455 ut = jauPmp(pv[1], ur);
17456 vt = jauPm(ut);
17457
17458 /* Special-relativity dimensionless parameters. */
17459 bett = vt / DC;
17460 betr = vr / DC;
17461
17462 /* The inertial-to-observed correction terms. */
17463 d = 1.0 + betr;
17464 w = betr*betr + bett*bett;
17465 if (d == 0.0 || w > 1) throw new JSOFAInternalError("Superluminal speed", -1);
17466 del = -w / (sqrt(1.0 -w) + 1.0);
17467
17468 /* Apply relativistic correction factor to radial velocity component. */
17469 w = (betr != 0) ? (betr - del) / (betr * d) : 1.0;
17470 usr = jauSxp(w,ur);
17471
17472 /* Apply relativistic correction factor to tangential velocity */
17473 /* component. */
17474 ust = jauSxp(1.0/d, ut);
17475
17476 /* Combine the two to obtain the observed velocity vector (au/day). */
17477 pv[1] = jauPpp(usr, ust);
17478
17479 /* Cartesian to spherical. */
17480 SphericalPositionVelocity pvs = jauPv2s(pv);
17481 if (pvs.pos.r == 0.0) throw new JSOFAInternalError("null position vector", -2);
17482
17483 /* Return RA in range 0 to 2pi. */
17484 double ra = jauAnp(pvs.pos.theta);
17485
17486 /* Return proper motions in radians per year. */
17487 double pmr = pvs.vel.theta * DJY;
17488 double pmd = pvs.vel.phi * DJY;
17489
17490 /* Return parallax in arcsec. */
17491 double px = DR2AS / pvs.pos.r;
17492
17493 /* Return radial velocity in km/s. */
17494 double rv = 1e-3 * pvs.vel.r * DAU / DAYSEC;
17495
17496 /* OK status. */
17497 return new CatalogCoords(ra, pvs.pos.phi, pmr, pmd, px, rv);
17498
17499 }
17500
17501
17502 /**
17503 * Update a pv-vector.
17504 *
17505 *<p>This function is derived from the International Astronomical Union's
17506 * SOFA (Standards Of Fundamental Astronomy) software collection.
17507 *
17508 *<p>Status: vector/matrix support function.
17509 *
17510 *<!-- Given: -->
17511 * @param dt double time interval
17512 * @param pv double[2][3] pv-vector
17513 *
17514 *<!-- Returned: -->
17515 * @return upv double[2][3] <u>returned</u> p updated, v unchanged
17516 *
17517 * <p>Notes:
17518 * <ol>
17519 *
17520 * <li> "Update" means "refer the position component of the vector
17521 * to a new date dt time units from the existing date".
17522 *
17523 * <li> The time units of dt must match those of the velocity.
17524 *
17525 * <li> It is permissible for pv and upv to be the same array.
17526 *</ol>
17527 *<p>Called:<ul>
17528 * <li>{@link #jauPpsp} p-vector plus scaled p-vector
17529 * <li>{@link #jauCp} copy p-vector
17530 * </ul>
17531 *@version 2008 November 17
17532 *
17533 * @since Release 20101201
17534 *
17535 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
17536 */
17537 public static double[][] jauPvu(double dt, double pv[][] )
17538 {
17539 double upv[][] = new double[2][3];
17540 upv[0] = jauPpsp(pv[0], dt, pv[1]);
17541 jauCp(pv[1], upv[1]);
17542
17543 return upv;
17544
17545 }
17546
17547
17548 /**
17549 * Update a pv-vector, discarding the velocity component.
17550 *
17551 *<p>This function is derived from the International Astronomical Union's
17552 * SOFA (Standards Of Fundamental Astronomy) software collection.
17553 *
17554 *<p>Status: vector/matrix support function.
17555 *
17556 *<!-- Given: -->
17557 * @param dt double time interval
17558 * @param pv double[2][3] pv-vector
17559 *
17560 *<!-- Returned: -->
17561 * @return p double[3] <u>returned</u> p-vector
17562 *
17563 * <p>Notes:
17564 * <ol>
17565 *
17566 * <li> "Update" means "refer the position component of the vector to a
17567 * new date dt time units from the existing date".
17568 *
17569 * <li> The time units of dt must match those of the velocity.
17570 *</ol>
17571 *@version 2008 May 11
17572 *
17573 * @since Release 20101201
17574 *
17575 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
17576 */
17577 public static double[] jauPvup(double dt, double pv[][] )
17578 {
17579 double p[] = new double[3];
17580 p[0] = pv[0][0] + dt * pv[1][0];
17581 p[1] = pv[0][1] + dt * pv[1][1];
17582 p[2] = pv[0][2] + dt * pv[1][2];
17583
17584 return p;
17585
17586 }
17587
17588
17589 /**
17590 * Outer (=vector=cross) product of two pv-vectors.
17591 *
17592 *<p>This function is derived from the International Astronomical Union's
17593 * SOFA (Standards Of Fundamental Astronomy) software collection.
17594 *
17595 *<p>Status: vector/matrix support function.
17596 *
17597 *<!-- Given: -->
17598 * @param a double[2][3] first pv-vector
17599 * @param b double[2][3] second pv-vector
17600 *
17601 *<!-- Returned: -->
17602 * @return axb double[2][3] <u>returned</u> a x b
17603 *
17604 * <p>Notes:
17605 * <ol>
17606 *
17607 * <li> If the position and velocity components of the two pv-vectors are
17608 * ( ap, av ) and ( bp, bv ), the result, a x b, is the pair of
17609 * vectors ( ap x bp, ap x bv + av x bp ). The two vectors are the
17610 * cross-product of the two p-vectors and its derivative.
17611 *
17612 * <li> It is permissible to re-use the same array for any of the
17613 * arguments.
17614 *</ol>
17615 *<p>Called:<ul>
17616 * <li>{@link #jauCpv} copy pv-vector
17617 * <li>{@link #jauPxp} vector product of two p-vectors
17618 * <li>{@link #jauPpp} p-vector plus p-vector
17619 * </ul>
17620 *@version 2008 November 18
17621 *
17622 * @since Release 20101201
17623 *
17624 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
17625 */
17626 public static double[][] jauPvxpv(double a[][], double b[][] )
17627 {
17628 double wa[][] = new double[2][3], wb[][] = new double[2][3], axbd[] = new double[3], adxb[] = new double[3];
17629
17630 double axb[][] = new double[2][3];
17631 /* Make copies of the inputs. */
17632 jauCpv(a, wa);
17633 jauCpv(b, wb);
17634
17635 /* a x b = position part of result. */
17636 axb[0] = jauPxp(wa[0], wb[0]);
17637
17638 /* a x bdot + adot x b = velocity part of result. */
17639 axbd = jauPxp(wa[0],wb[1]);
17640 adxb = jauPxp(wa[1],wb[0]);
17641 axb[1] = jauPpp(axbd, adxb);
17642
17643 return axb;
17644
17645 }
17646
17647
17648 /**
17649 * p-vector outer (=vector=cross) product.
17650 *
17651 *<p>This function is derived from the International Astronomical Union's
17652 * SOFA (Standards Of Fundamental Astronomy) software collection.
17653 *
17654 *<p>Status: vector/matrix support function.
17655 *
17656 *<!-- Given: -->
17657 * @param a double[3] first p-vector
17658 * @param b double[3] second p-vector
17659 *
17660 *<!-- Returned: -->
17661 * @return axb double[3] <u>returned</u> a x b
17662 *
17663 * Note:
17664 * It is permissible to re-use the same array for any of the
17665 * arguments.
17666 *
17667 *@version 2008 November 18
17668 *
17669 * @since Release 20101201
17670 *
17671 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
17672 */
17673 public static double[] jauPxp(double a[] , double b[] )
17674 {
17675 double xa, ya, za, xb, yb, zb;
17676 double axb[] = new double[3];
17677
17678 xa = a[0];
17679 ya = a[1];
17680 za = a[2];
17681 xb = b[0];
17682 yb = b[1];
17683 zb = b[2];
17684 axb[0] = ya*zb - za*yb;
17685 axb[1] = za*xb - xa*zb;
17686 axb[2] = xa*yb - ya*xb;
17687
17688 return axb;
17689
17690 }
17691
17692
17693 /**
17694 * Express an r-matrix as an r-vector.
17695 *
17696 *<p>This function is derived from the International Astronomical Union's
17697 * SOFA (Standards Of Fundamental Astronomy) software collection.
17698 *
17699 *<p>Status: vector/matrix support function.
17700 *
17701 *<!-- Given: -->
17702 * @param r double[3][3] rotation matrix
17703 *
17704 *<!-- Returned: -->
17705 * @return w double[3] <u>returned</u> rotation vector (Note 1)
17706 *
17707 * <p>Notes:
17708 * <ol>
17709 *
17710 * <li> A rotation matrix describes a rotation through some angle about
17711 * some arbitrary axis called the Euler axis. The "rotation vector"
17712 * returned by this function has the same direction as the Euler axis,
17713 * and its magnitude is the angle in radians. (The magnitude and
17714 * direction can be separated by means of the function jauPn.)
17715 *
17716 * <li> If r is null, so is the result. If r is not a rotation matrix
17717 * the result is undefined; r must be proper (i.e. have a positive
17718 * determinant) and real orthogonal (inverse = transpose).
17719 *
17720 * <li> The reference frame rotates clockwise as seen looking along
17721 * the rotation vector from the origin.
17722 *</ol>
17723 *@version 2008 May 12
17724 *
17725 * @since Release 20101201
17726 *
17727 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
17728 */
17729 public static double[] jauRm2v(double r[][] )
17730 {
17731 double x, y, z, s2, c2, phi, f;
17732 double w[] = new double[3];
17733
17734 x = r[1][2] - r[2][1];
17735 y = r[2][0] - r[0][2];
17736 z = r[0][1] - r[1][0];
17737 s2 = sqrt(x*x + y*y + z*z);
17738 if (s2 > 0) {
17739 c2 = r[0][0] + r[1][1] + r[2][2] - 1;
17740 phi = atan2(s2, c2);
17741 f = phi / s2;
17742 w[0] = x * f;
17743 w[1] = y * f;
17744 w[2] = z * f;
17745 } else {
17746 w[0] = 0.0;
17747 w[1] = 0.0;
17748 w[2] = 0.0;
17749 }
17750
17751 return w;
17752
17753 }
17754
17755
17756 /**
17757 * Form the r-matrix corresponding to a given r-vector.
17758 *
17759 *<p>This function is derived from the International Astronomical Union's
17760 * SOFA (Standards Of Fundamental Astronomy) software collection.
17761 *
17762 *<p>Status: vector/matrix support function.
17763 *
17764 *<!-- Given: -->
17765 * @param w double[3] rotation vector (Note 1)
17766 *
17767 *<!-- Returned: -->
17768 * @return r double[3][3] <u>returned</u> rotation matrix
17769 *
17770 * <p>Notes:
17771 * <ol>
17772 *
17773 * <li> A rotation matrix describes a rotation through some angle about
17774 * some arbitrary axis called the Euler axis. The "rotation vector"
17775 * supplied to This function has the same direction as the Euler
17776 * axis, and its magnitude is the angle in radians.
17777 *
17778 * <li> If w is null, the unit matrix is returned.
17779 *
17780 * <li> The reference frame rotates clockwise as seen looking along the
17781 * rotation vector from the origin.
17782 *</ol>
17783 *@version 2008 May 11
17784 *
17785 * @since Release 20101201
17786 *
17787 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
17788 */
17789 public static double[][] jauRv2m(double w[])
17790 {
17791 double x, y, z, phi, s, c, f;
17792 double r[][] = new double[3][3];
17793
17794
17795 /* Euler angle (magnitude of rotation vector) and functions. */
17796 x = w[0];
17797 y = w[1];
17798 z = w[2];
17799 phi = sqrt(x*x + y*y + z*z);
17800 s = sin(phi);
17801 c = cos(phi);
17802 f = 1.0 - c;
17803
17804 /* Euler axis (direction of rotation vector), perhaps null. */
17805 if (phi > 0.0) {
17806 x /= phi;
17807 y /= phi;
17808 z /= phi;
17809 }
17810
17811 /* Form the rotation matrix. */
17812 r[0][0] = x*x*f + c;
17813 r[0][1] = x*y*f + z*s;
17814 r[0][2] = x*z*f - y*s;
17815 r[1][0] = y*x*f - z*s;
17816 r[1][1] = y*y*f + c;
17817 r[1][2] = y*z*f + x*s;
17818 r[2][0] = z*x*f + y*s;
17819 r[2][1] = z*y*f - x*s;
17820 r[2][2] = z*z*f + c;
17821
17822 return r;
17823
17824 }
17825
17826
17827 /**
17828 * Rotate an r-matrix about the x-axis.
17829 *
17830 *<p>This function is derived from the International Astronomical Union's
17831 * SOFA (Standards Of Fundamental Astronomy) software collection.
17832 *
17833 *<p>Status: vector/matrix support function.
17834 *
17835 *<!-- Given: -->
17836 * @param phi double angle (radians)
17837 *
17838 * Given and returned:
17839 * @param r double[3][3] r-matrix <u>given and returned</u>
17840 *
17841 * Sign convention: The matrix can be used to rotate the reference
17842 * frame of a vector. Calling this function with positive phi
17843 * incorporates in the matrix an additional rotation, about the x-axis,
17844 * anticlockwise as seen looking towards the origin from positive x.
17845 *
17846 *<p>Called:<ul>
17847 * <li>{@link #jauIr} initialize r-matrix to identity
17848 * <li>{@link #jauRxr} product of two r-matrices
17849 * <li>{@link #jauCr} copy r-matrix
17850 * </ul>
17851 *@version 2008 May 22
17852 *
17853 * @since Release 20101201
17854 *
17855 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
17856 */
17857 public static void jauRx(double phi, double r[][])
17858 {
17859 double s, c, a[][] = new double[3][3], w[][];
17860
17861
17862 /* Matrix representing new rotation. */
17863 s = sin(phi);
17864 c = cos(phi);
17865 jauIr(a);
17866 a[1][1] = c;
17867 a[2][1] = -s;
17868 a[1][2] = s;
17869 a[2][2] = c;
17870
17871 /* Rotate. */
17872 w = jauRxr(a, r);
17873
17874 /* Return result. */
17875 jauCr(w, r);
17876
17877 return;
17878
17879 }
17880
17881
17882 /**
17883 * Multiply a p-vector by an r-matrix.
17884 *
17885 *<p>This function is derived from the International Astronomical Union's
17886 * SOFA (Standards Of Fundamental Astronomy) software collection.
17887 *
17888 *<p>Status: vector/matrix support function.
17889 *
17890 *<!-- Given: -->
17891 * @param r double[3][3] r-matrix
17892 * @param p double[3] p-vector
17893 *
17894 *<!-- Returned: -->
17895 * @return rp double[3] <u>returned</u> r * p
17896 *
17897 * Note:
17898 * It is permissible for p and rp to be the same array.
17899 *
17900 *<p>Called:<ul>
17901 * <li>{@link #jauCp} copy p-vector
17902 * </ul>
17903 *@version 2008 October 28
17904 *
17905 * @since Release 20101201
17906 *
17907 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
17908 */
17909 public static double[] jauRxp(double r[][], double p[])
17910 {
17911 double w, wrp[] = new double[3] ;
17912 int i, j;
17913
17914
17915 /* Matrix r * vector p. */
17916 for (j = 0; j < 3; j++) {
17917 w = 0.0;
17918 for (i = 0; i < 3; i++) {
17919 w += r[j][i] * p[i];
17920 }
17921 wrp[j] = w;
17922 }
17923
17924
17925 return wrp;
17926
17927 }
17928
17929
17930 /**
17931 * Multiply a pv-vector by an r-matrix.
17932 *
17933 *<p>This function is derived from the International Astronomical Union's
17934 * SOFA (Standards Of Fundamental Astronomy) software collection.
17935 *
17936 *<p>Status: vector/matrix support function.
17937 *
17938 *<!-- Given: -->
17939 * @param r double[3][3] r-matrix
17940 * @param pv double[2][3] pv-vector
17941 *
17942 *<!-- Returned: -->
17943 * @return rpv double[2][3] <u>returned</u> r * pv
17944 *
17945 * Note:
17946 * It is permissible for pv and rpv to be the same array.
17947 *
17948 *<p>Called:<ul>
17949 * <li>{@link #jauRxp} product of r-matrix and p-vector
17950 * </ul>
17951 *@version 2008 October 28
17952 *
17953 * @since Release 20101201
17954 *
17955 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
17956 */
17957 public static double[][] jauRxpv(double r[][], double pv[][])
17958 {
17959 double rpv[][] = new double[2][0];
17960 rpv[0] = jauRxp(r, pv[0]);
17961 rpv[1] = jauRxp(r, pv[1]);
17962
17963 return rpv;
17964
17965 }
17966
17967
17968 /**
17969 * Multiply two r-matrices.
17970 *
17971 *<p>This function is derived from the International Astronomical Union's
17972 * SOFA (Standards Of Fundamental Astronomy) software collection.
17973 *
17974 *<p>Status: vector/matrix support function.
17975 *
17976 *<!-- Given: -->
17977 * @param a double[3][3] first r-matrix
17978 * @param b double[3][3] second r-matrix
17979 *
17980 *<!-- Returned: -->
17981 * @return atb double[3][3] <u>returned</u> a * b
17982 *
17983 * Note:
17984 * It is permissible to re-use the same array for any of the
17985 * arguments.
17986 *
17987 *<p>Called:<ul>
17988 * <li>{@link #jauCr} copy r-matrix
17989 * </ul>
17990 *@version 2008 November 18
17991 *
17992 * @since Release 20101201
17993 *
17994 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
17995 */
17996 public static double[][] jauRxr(double a[][], double b[][])
17997 {
17998 int i, j, k;
17999 double w, wm[][] = new double[3][3];
18000
18001
18002 for (i = 0; i < 3; i++) {
18003 for (j = 0; j < 3; j++) {
18004 w = 0.0;
18005 for (k = 0; k < 3; k++) {
18006 w += a[i][k] * b[k][j];
18007 }
18008 wm[i][j] = w;
18009 }
18010 }
18011
18012 return wm;
18013
18014 }
18015
18016
18017 /**
18018 * Rotate an r-matrix about the y-axis.
18019 *
18020 *<p>This function is derived from the International Astronomical Union's
18021 * SOFA (Standards Of Fundamental Astronomy) software collection.
18022 *
18023 *<p>Status: vector/matrix support function.
18024 *
18025 *<!-- Given: -->
18026 * @param theta double angle (radians)
18027 *
18028 * Given and returned:
18029 * @param r double[3][3] <u>given & returned</u> r-matrix
18030 *
18031 * Sign convention: The matrix can be used to rotate the reference
18032 * frame of a vector. Calling This function with positive theta
18033 * incorporates in the matrix an additional rotation, about the y-axis,
18034 * anticlockwise as seen looking towards the origin from positive y.
18035 *
18036 *<p>Called:<ul>
18037 * <li>{@link #jauIr} initialize r-matrix to identity
18038 * <li>{@link #jauRxr} product of two r-matrices
18039 * <li>{@link #jauCr} copy r-matrix
18040 * </ul>
18041 *@version 2008 May 22
18042 *
18043 * @since Release 20101201
18044 *
18045 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
18046 */
18047 public static void jauRy(double theta, double r[][])
18048 {
18049 double s, c, a[][] = new double[3][3], w[][];
18050
18051
18052 /* Matrix representing new rotation. */
18053 s = sin(theta);
18054 c = cos(theta);
18055 jauIr(a);
18056 a[0][0] = c;
18057 a[2][0] = s;
18058 a[0][2] = -s;
18059 a[2][2] = c;
18060
18061 /* Rotate. */
18062 w = jauRxr(a, r);
18063
18064 /* Return result. */
18065 jauCr(w, r);
18066
18067 return;
18068
18069 }
18070
18071
18072 /**
18073 * Rotate an r-matrix about the z-axis.
18074 *
18075 *<p>This function is derived from the International Astronomical Union's
18076 * SOFA (Standards Of Fundamental Astronomy) software collection.
18077 *
18078 *<p>Status: vector/matrix support function.
18079 *
18080 *<!-- Given: -->
18081 * @param psi double angle (radians)
18082 *
18083 * Given and returned:
18084 * @param r double[3][3] <u>given & retuned</u>r-matrix, rotated
18085 *
18086 * Sign convention: The matrix can be used to rotate the reference
18087 * frame of a vector. Calling This function with positive psi
18088 * incorporates in the matrix an additional rotation, about the z-axis,
18089 * anticlockwise as seen looking towards the origin from positive z.
18090 *
18091 *<p>Called:<ul>
18092 * <li>{@link #jauIr} initialize r-matrix to identity
18093 * <li>{@link #jauRxr} product of two r-matrices
18094 * <li>{@link #jauCr} copy r-matrix
18095 * </ul>
18096 *@version 2008 May 22
18097 *
18098 * @since Release 20101201
18099 *
18100 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
18101 */
18102 public static void jauRz(double psi, double r[][])
18103 {
18104 double s, c, a[][] = new double[3][3], w[][];
18105
18106
18107 /* Matrix representing new rotation. */
18108 s = sin(psi);
18109 c = cos(psi);
18110 jauIr(a);
18111 a[0][0] = c;
18112 a[1][0] = -s;
18113 a[0][1] = s;
18114 a[1][1] = c;
18115
18116 /* Rotate. */
18117 w = jauRxr(a, r);
18118
18119 /* Return result. */
18120 jauCr(w, r);
18121
18122 return;
18123
18124 }
18125
18126
18127 /**
18128 * The CIO locator s, positioning the Celestial Intermediate Origin on
18129 * the equator of the Celestial Intermediate Pole, given the CIP's X,Y
18130 * coordinates. Compatible with IAU 2000A precession-nutation.
18131 *
18132 *<p>This function is derived from the International Astronomical Union's
18133 * SOFA (Standards Of Fundamental Astronomy) software collection.
18134 *
18135 *<p>Status: canonical model.
18136 *
18137 *<!-- Given: -->
18138 * @param date1 double TT as a 2-part Julian Date (Note 1)
18139 * @param date2 double TT as a 2-part Julian Date (Note 1)
18140 * @param x double CIP coordinates (Note 3)
18141 * @param y double CIP coordinates (Note 3)
18142 *
18143 * <!-- Returned (function value): -->
18144 * @return double the CIO locator s in radians (Note 2)
18145 *
18146 * <p>Notes:
18147 * <ol>
18148 *
18149 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
18150 * convenient way between the two arguments. For example,
18151 * JD(TT)=2450123.7 could be expressed in any of these ways,
18152 * among others:
18153 *<pre>
18154 * date1 date2
18155 *
18156 * 2450123.7 0.0 (JD method)
18157 * 2451545.0 -1421.3 (J2000 method)
18158 * 2400000.5 50123.2 (MJD method)
18159 * 2450123.5 0.2 (date & time method)
18160 *</pre>
18161 * The JD method is the most natural and convenient to use in
18162 * cases where the loss of several decimal digits of resolution
18163 * is acceptable. The J2000 method is best matched to the way
18164 * the argument is handled internally and will deliver the
18165 * optimum resolution. The MJD method and the date & time methods
18166 * are both good compromises between resolution and convenience.
18167 *
18168 * <li> The CIO locator s is the difference between the right ascensions
18169 * of the same point in two systems: the two systems are the GCRS
18170 * and the CIP,CIO, and the point is the ascending node of the
18171 * CIP equator. The quantity s remains below 0.1 arcsecond
18172 * throughout 1900-2100.
18173 *
18174 * <li> The series used to compute s is in fact for s+XY/2, where X and Y
18175 * are the x and y components of the CIP unit vector; this series
18176 * is more compact than a direct series for s would be. This
18177 * function requires X,Y to be supplied by the caller, who is
18178 * responsible for providing values that are consistent with the
18179 * supplied date.
18180 *
18181 * <li> The model is consistent with the IAU 2000A precession-nutation.
18182 *</ol>
18183 *<p>Called:<ul>
18184 * <li>{@link #jauFal03} mean anomaly of the Moon
18185 * <li>{@link #jauFalp03} mean anomaly of the Sun
18186 * <li>{@link #jauFaf03} mean argument of the latitude of the Moon
18187 * <li>{@link #jauFad03} mean elongation of the Moon from the Sun
18188 * <li>{@link #jauFaom03} mean longitude of the Moon's ascending node
18189 * <li>{@link #jauFave03} mean longitude of Venus
18190 * <li>{@link #jauFae03} mean longitude of Earth
18191 * <li>{@link #jauFapa03} general accumulated precession in longitude
18192 * </ul>
18193 *<p>References:
18194 *
18195 * <p>Capitaine, N., Chapront, J., Lambert, S. and Wallace, P.,
18196 * "Expressions for the Celestial Intermediate Pole and Celestial
18197 * Ephemeris Origin consistent with the IAU 2000A precession-
18198 * nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
18199 *
18200 * n.b. The celestial ephemeris origin (CEO) was renamed "celestial
18201 * intermediate origin" (CIO) by IAU 2006 Resolution 2.
18202 *
18203 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
18204 * IERS Technical Note No. 32, BKG (2004)
18205 *
18206 *@version 2010 January 18
18207 *
18208 * @since Release 20101201
18209 *
18210 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
18211 */
18212 public static double jauS00(double date1, double date2, double x, double y)
18213 {
18214 /* Time since J2000.0, in Julian centuries */
18215 double t;
18216
18217 /* Miscellaneous */
18218 int i, j;
18219 double a, w0, w1, w2, w3, w4, w5;
18220
18221 /* Fundamental arguments */
18222 double fa[] = new double[8];
18223
18224 /* Returned value */
18225 double s;
18226
18227 /* --------------------- */
18228 /* The series for s+XY/2 */
18229 /* --------------------- */
18230
18231 /* Polynomial coefficients */
18232 final double sp[] = {
18233
18234 /* 1-6 */
18235 94.00e-6,
18236 3808.35e-6,
18237 -119.94e-6,
18238 -72574.09e-6,
18239 27.70e-6,
18240 15.61e-6
18241 };
18242
18243 /* Terms of order t^0 */
18244 final TERM s0[] = {
18245
18246 /* 1-10 */
18247 new TERM(new int[]{ 0, 0, 0, 0, 1, 0, 0, 0}, -2640.73e-6, 0.39e-6 ),
18248 new TERM(new int[]{ 0, 0, 0, 0, 2, 0, 0, 0}, -63.53e-6, 0.02e-6 ),
18249 new TERM(new int[]{ 0, 0, 2, -2, 3, 0, 0, 0}, -11.75e-6, -0.01e-6 ),
18250 new TERM(new int[]{ 0, 0, 2, -2, 1, 0, 0, 0}, -11.21e-6, -0.01e-6 ),
18251 new TERM(new int[]{ 0, 0, 2, -2, 2, 0, 0, 0}, 4.57e-6, 0.00e-6 ),
18252 new TERM(new int[]{ 0, 0, 2, 0, 3, 0, 0, 0}, -2.02e-6, 0.00e-6 ),
18253 new TERM(new int[]{ 0, 0, 2, 0, 1, 0, 0, 0}, -1.98e-6, 0.00e-6 ),
18254 new TERM(new int[]{ 0, 0, 0, 0, 3, 0, 0, 0}, 1.72e-6, 0.00e-6 ),
18255 new TERM(new int[]{ 0, 1, 0, 0, 1, 0, 0, 0}, 1.41e-6, 0.01e-6 ),
18256 new TERM(new int[]{ 0, 1, 0, 0, -1, 0, 0, 0}, 1.26e-6, 0.01e-6 ),
18257
18258 /* 11-20 */
18259 new TERM(new int[]{ 1, 0, 0, 0, -1, 0, 0, 0}, 0.63e-6, 0.00e-6 ),
18260 new TERM(new int[]{ 1, 0, 0, 0, 1, 0, 0, 0}, 0.63e-6, 0.00e-6 ),
18261 new TERM(new int[]{ 0, 1, 2, -2, 3, 0, 0, 0}, -0.46e-6, 0.00e-6 ),
18262 new TERM(new int[]{ 0, 1, 2, -2, 1, 0, 0, 0}, -0.45e-6, 0.00e-6 ),
18263 new TERM(new int[]{ 0, 0, 4, -4, 4, 0, 0, 0}, -0.36e-6, 0.00e-6 ),
18264 new TERM(new int[]{ 0, 0, 1, -1, 1, -8, 12, 0}, 0.24e-6, 0.12e-6 ),
18265 new TERM(new int[]{ 0, 0, 2, 0, 0, 0, 0, 0}, -0.32e-6, 0.00e-6 ),
18266 new TERM(new int[]{ 0, 0, 2, 0, 2, 0, 0, 0}, -0.28e-6, 0.00e-6 ),
18267 new TERM(new int[]{ 1, 0, 2, 0, 3, 0, 0, 0}, -0.27e-6, 0.00e-6 ),
18268 new TERM(new int[]{ 1, 0, 2, 0, 1, 0, 0, 0}, -0.26e-6, 0.00e-6 ),
18269
18270 /* 21-30 */
18271 new TERM(new int[]{ 0, 0, 2, -2, 0, 0, 0, 0}, 0.21e-6, 0.00e-6 ),
18272 new TERM(new int[]{ 0, 1, -2, 2, -3, 0, 0, 0}, -0.19e-6, 0.00e-6 ),
18273 new TERM(new int[]{ 0, 1, -2, 2, -1, 0, 0, 0}, -0.18e-6, 0.00e-6 ),
18274 new TERM(new int[]{ 0, 0, 0, 0, 0, 8,-13, -1}, 0.10e-6, -0.05e-6 ),
18275 new TERM(new int[]{ 0, 0, 0, 2, 0, 0, 0, 0}, -0.15e-6, 0.00e-6 ),
18276 new TERM(new int[]{ 2, 0, -2, 0, -1, 0, 0, 0}, 0.14e-6, 0.00e-6 ),
18277 new TERM(new int[]{ 0, 1, 2, -2, 2, 0, 0, 0}, 0.14e-6, 0.00e-6 ),
18278 new TERM(new int[]{ 1, 0, 0, -2, 1, 0, 0, 0}, -0.14e-6, 0.00e-6 ),
18279 new TERM(new int[]{ 1, 0, 0, -2, -1, 0, 0, 0}, -0.14e-6, 0.00e-6 ),
18280 new TERM(new int[]{ 0, 0, 4, -2, 4, 0, 0, 0}, -0.13e-6, 0.00e-6 ),
18281
18282 /* 31-33 */
18283 new TERM(new int[]{ 0, 0, 2, -2, 4, 0, 0, 0}, 0.11e-6, 0.00e-6 ),
18284 new TERM(new int[]{ 1, 0, -2, 0, -3, 0, 0, 0}, -0.11e-6, 0.00e-6 ),
18285 new TERM(new int[]{ 1, 0, -2, 0, -1, 0, 0, 0}, -0.11e-6, 0.00e-6 )
18286 };
18287
18288 /* Terms of order t^1 */
18289 final TERM s1[] ={
18290
18291 /* 1-3 */
18292 new TERM(new int[]{ 0, 0, 0, 0, 2, 0, 0, 0}, -0.07e-6, 3.57e-6 ),
18293 new TERM(new int[]{ 0, 0, 0, 0, 1, 0, 0, 0}, 1.71e-6, -0.03e-6 ),
18294 new TERM(new int[]{ 0, 0, 2, -2, 3, 0, 0, 0}, 0.00e-6, 0.48e-6 )
18295 };
18296
18297 /* Terms of order t^2 */
18298 final TERM s2[] ={
18299
18300 /* 1-10 */
18301 new TERM(new int[]{ 0, 0, 0, 0, 1, 0, 0, 0}, 743.53e-6, -0.17e-6 ),
18302 new TERM(new int[]{ 0, 0, 2, -2, 2, 0, 0, 0}, 56.91e-6, 0.06e-6 ),
18303 new TERM(new int[]{ 0, 0, 2, 0, 2, 0, 0, 0}, 9.84e-6, -0.01e-6 ),
18304 new TERM(new int[]{ 0, 0, 0, 0, 2, 0, 0, 0}, -8.85e-6, 0.01e-6 ),
18305 new TERM(new int[]{ 0, 1, 0, 0, 0, 0, 0, 0}, -6.38e-6, -0.05e-6 ),
18306 new TERM(new int[]{ 1, 0, 0, 0, 0, 0, 0, 0}, -3.07e-6, 0.00e-6 ),
18307 new TERM(new int[]{ 0, 1, 2, -2, 2, 0, 0, 0}, 2.23e-6, 0.00e-6 ),
18308 new TERM(new int[]{ 0, 0, 2, 0, 1, 0, 0, 0}, 1.67e-6, 0.00e-6 ),
18309 new TERM(new int[]{ 1, 0, 2, 0, 2, 0, 0, 0}, 1.30e-6, 0.00e-6 ),
18310 new TERM(new int[]{ 0, 1, -2, 2, -2, 0, 0, 0}, 0.93e-6, 0.00e-6 ),
18311
18312 /* 11-20 */
18313 new TERM(new int[]{ 1, 0, 0, -2, 0, 0, 0, 0}, 0.68e-6, 0.00e-6 ),
18314 new TERM(new int[]{ 0, 0, 2, -2, 1, 0, 0, 0}, -0.55e-6, 0.00e-6 ),
18315 new TERM(new int[]{ 1, 0, -2, 0, -2, 0, 0, 0}, 0.53e-6, 0.00e-6 ),
18316 new TERM(new int[]{ 0, 0, 0, 2, 0, 0, 0, 0}, -0.27e-6, 0.00e-6 ),
18317 new TERM(new int[]{ 1, 0, 0, 0, 1, 0, 0, 0}, -0.27e-6, 0.00e-6 ),
18318 new TERM(new int[]{ 1, 0, -2, -2, -2, 0, 0, 0}, -0.26e-6, 0.00e-6 ),
18319 new TERM(new int[]{ 1, 0, 0, 0, -1, 0, 0, 0}, -0.25e-6, 0.00e-6 ),
18320 new TERM(new int[]{ 1, 0, 2, 0, 1, 0, 0, 0}, 0.22e-6, 0.00e-6 ),
18321 new TERM(new int[]{ 2, 0, 0, -2, 0, 0, 0, 0}, -0.21e-6, 0.00e-6 ),
18322 new TERM(new int[]{ 2, 0, -2, 0, -1, 0, 0, 0}, 0.20e-6, 0.00e-6 ),
18323
18324 /* 21-25 */
18325 new TERM(new int[]{ 0, 0, 2, 2, 2, 0, 0, 0}, 0.17e-6, 0.00e-6 ),
18326 new TERM(new int[]{ 2, 0, 2, 0, 2, 0, 0, 0}, 0.13e-6, 0.00e-6 ),
18327 new TERM(new int[]{ 2, 0, 0, 0, 0, 0, 0, 0}, -0.13e-6, 0.00e-6 ),
18328 new TERM(new int[]{ 1, 0, 2, -2, 2, 0, 0, 0}, -0.12e-6, 0.00e-6 ),
18329 new TERM(new int[]{ 0, 0, 2, 0, 0, 0, 0, 0}, -0.11e-6, 0.00e-6 )
18330 };
18331
18332 /* Terms of order t^3 */
18333 final TERM s3[] ={
18334
18335 /* 1-4 */
18336 new TERM(new int[]{ 0, 0, 0, 0, 1, 0, 0, 0}, 0.30e-6, -23.51e-6 ),
18337 new TERM(new int[]{ 0, 0, 2, -2, 2, 0, 0, 0}, -0.03e-6, -1.39e-6 ),
18338 new TERM(new int[]{ 0, 0, 2, 0, 2, 0, 0, 0}, -0.01e-6, -0.24e-6 ),
18339 new TERM(new int[]{ 0, 0, 0, 0, 2, 0, 0, 0}, 0.00e-6, 0.22e-6 )
18340 };
18341
18342 /* Terms of order t^4 */
18343 final TERM s4[] ={
18344
18345 /* 1-1 */
18346 new TERM(new int[]{ 0, 0, 0, 0, 1, 0, 0, 0}, -0.26e-6, -0.01e-6 )
18347 };
18348
18349 /* Number of terms in the series */
18350 final int NS0 = s0.length;
18351 final int NS1 = s1.length;
18352 final int NS2 = s2.length;
18353 final int NS3 = s3.length;
18354 final int NS4 = s4.length;
18355
18356 /*--------------------------------------------------------------------*/
18357
18358 /* Interval between fundamental epoch J2000.0 and current date (JC). */
18359 t = ((date1 - DJ00) + date2) / DJC;
18360
18361 /* Fundamental Arguments (from IERS Conventions 2003) */
18362
18363 /* Mean anomaly of the Moon. */
18364 fa[0] = jauFal03(t);
18365
18366 /* Mean anomaly of the Sun. */
18367 fa[1] = jauFalp03(t);
18368
18369 /* Mean longitude of the Moon minus that of the ascending node. */
18370 fa[2] = jauFaf03(t);
18371
18372 /* Mean elongation of the Moon from the Sun. */
18373 fa[3] = jauFad03(t);
18374
18375 /* Mean longitude of the ascending node of the Moon. */
18376 fa[4] = jauFaom03(t);
18377
18378 /* Mean longitude of Venus. */
18379 fa[5] = jauFave03(t);
18380
18381 /* Mean longitude of Earth. */
18382 fa[6] = jauFae03(t);
18383
18384 /* General precession in longitude. */
18385 fa[7] = jauFapa03(t);
18386
18387 /* Evaluate s. */
18388 w0 = sp[0];
18389 w1 = sp[1];
18390 w2 = sp[2];
18391 w3 = sp[3];
18392 w4 = sp[4];
18393 w5 = sp[5];
18394
18395 for (i = NS0-1; i >= 0; i--) {
18396 a = 0.0;
18397 for (j = 0; j < 8; j++) {
18398 a += (double)s0[i].nfa[j] * fa[j];
18399 }
18400 w0 += s0[i].s * sin(a) + s0[i].c * cos(a);
18401 }
18402
18403 for (i = NS1-1; i >= 0; i--) {
18404 a = 0.0;
18405 for (j = 0; j < 8; j++) {
18406 a += (double)s1[i].nfa[j] * fa[j];
18407 }
18408 w1 += s1[i].s * sin(a) + s1[i].c * cos(a);
18409 }
18410
18411 for (i = NS2-1; i >= 0; i--) {
18412 a = 0.0;
18413 for (j = 0; j < 8; j++) {
18414 a += (double)s2[i].nfa[j] * fa[j];
18415 }
18416 w2 += s2[i].s * sin(a) + s2[i].c * cos(a);
18417 }
18418
18419 for (i = NS3-1; i >= 0; i--) {
18420 a = 0.0;
18421 for (j = 0; j < 8; j++) {
18422 a += (double)s3[i].nfa[j] * fa[j];
18423 }
18424 w3 += s3[i].s * sin(a) + s3[i].c * cos(a);
18425 }
18426
18427 for (i = NS4-1; i >= 0; i--) {
18428 a = 0.0;
18429 for (j = 0; j < 8; j++) {
18430 a += (double)s4[i].nfa[j] * fa[j];
18431 }
18432 w4 += s4[i].s * sin(a) + s4[i].c * cos(a);
18433 }
18434
18435 s = (w0 +
18436 (w1 +
18437 (w2 +
18438 (w3 +
18439 (w4 +
18440 w5 * t) * t) * t) * t) * t) * DAS2R - x*y/2.0;
18441
18442 return s;
18443
18444 }
18445
18446
18447 /**
18448 * The CIO locator s, positioning the Celestial Intermediate Origin on
18449 * the equator of the Celestial Intermediate Pole, using the IAU 2000A
18450 * precession-nutation model.
18451 *
18452 *<p>This function is derived from the International Astronomical Union's
18453 * SOFA (Standards Of Fundamental Astronomy) software collection.
18454 *
18455 *<p>Status: support function.
18456 *
18457 *<!-- Given: -->
18458 * @param date1 double TT as a 2-part Julian Date (Note 1)
18459 * @param date2 double TT as a 2-part Julian Date (Note 1)
18460 *
18461 * <!-- Returned (function value): -->
18462 * @return double the CIO locator s in radians (Note 2)
18463 *
18464 * <p>Notes:
18465 * <ol>
18466 *
18467 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
18468 * convenient way between the two arguments. For example,
18469 * JD(TT)=2450123.7 could be expressed in any of these ways,
18470 * among others:
18471 *<pre>
18472 * date1 date2
18473 *
18474 * 2450123.7 0.0 (JD method)
18475 * 2451545.0 -1421.3 (J2000 method)
18476 * 2400000.5 50123.2 (MJD method)
18477 * 2450123.5 0.2 (date & time method)
18478 *</pre>
18479 * The JD method is the most natural and convenient to use in
18480 * cases where the loss of several decimal digits of resolution
18481 * is acceptable. The J2000 method is best matched to the way
18482 * the argument is handled internally and will deliver the
18483 * optimum resolution. The MJD method and the date & time methods
18484 * are both good compromises between resolution and convenience.
18485 *
18486 * <li> The CIO locator s is the difference between the right ascensions
18487 * of the same point in two systems. The two systems are the GCRS
18488 * and the CIP,CIO, and the point is the ascending node of the
18489 * CIP equator. The CIO locator s remains a small fraction of
18490 * 1 arcsecond throughout 1900-2100.
18491 *
18492 * <li> The series used to compute s is in fact for s+XY/2, where X and Y
18493 * are the x and y components of the CIP unit vector; this series
18494 * is more compact than a direct series for s would be. The present
18495 * function uses the full IAU 2000A nutation model when predicting
18496 * the CIP position. Faster results, with no significant loss of
18497 * accuracy, can be obtained via the function jauS00b, which uses
18498 * instead the IAU 2000B truncated model.
18499 *</ol>
18500 *<p>Called:<ul>
18501 * <li>{@link #jauPnm00a} classical NPB matrix, IAU 2000A
18502 * <li>{@link #jauBpn2xy} extract CIP X,Y from the BPN matrix
18503 * <li>{@link #jauS00} the CIO locator s, given X,Y, IAU 2000A
18504 * </ul>
18505 *<p>References:
18506 *
18507 * <p>Capitaine, N., Chapront, J., Lambert, S. and Wallace, P.,
18508 * "Expressions for the Celestial Intermediate Pole and Celestial
18509 * Ephemeris Origin consistent with the IAU 2000A precession-
18510 * nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
18511 *
18512 * n.b. The celestial ephemeris origin (CEO) was renamed "celestial
18513 * intermediate origin" (CIO) by IAU 2006 Resolution 2.
18514 *
18515 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
18516 * IERS Technical Note No. 32, BKG (2004)
18517 *
18518 *@version 2010 January 18
18519 *
18520 * @since Release 20101201
18521 *
18522 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
18523 */
18524 public static double jauS00a(double date1, double date2)
18525 {
18526 double s;
18527
18528
18529 /* Bias-precession-nutation-matrix, IAU 2000A. */
18530 double rbpn[][] = jauPnm00a(date1, date2);
18531
18532 /* Extract the CIP coordinates. */
18533 CelestialIntermediatePole cip = jauBpn2xy(rbpn);
18534
18535 /* Compute the CIO locator s, given the CIP coordinates. */
18536 s = jauS00(date1, date2, cip.x, cip.y);
18537
18538 return s;
18539
18540 }
18541
18542
18543 /**
18544 * The CIO locator s, positioning the Celestial Intermediate Origin on
18545 * the equator of the Celestial Intermediate Pole, using the IAU 2000B
18546 * precession-nutation model.
18547 *
18548 *<p>This function is derived from the International Astronomical Union's
18549 * SOFA (Standards Of Fundamental Astronomy) software collection.
18550 *
18551 *<p>Status: support function.
18552 *
18553 *<!-- Given: -->
18554 * @param date1 double TT as a 2-part Julian Date (Note 1)
18555 * @param date2 double TT as a 2-part Julian Date (Note 1)
18556 *
18557 * <!-- Returned (function value): -->
18558 * @return double the CIO locator s in radians (Note 2)
18559 *
18560 * <p>Notes:
18561 * <ol>
18562 *
18563 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
18564 * convenient way between the two arguments. For example,
18565 * JD(TT)=2450123.7 could be expressed in any of these ways,
18566 * among others:
18567 *<pre>
18568 * date1 date2
18569 *
18570 * 2450123.7 0.0 (JD method)
18571 * 2451545.0 -1421.3 (J2000 method)
18572 * 2400000.5 50123.2 (MJD method)
18573 * 2450123.5 0.2 (date & time method)
18574 *</pre>
18575 * The JD method is the most natural and convenient to use in
18576 * cases where the loss of several decimal digits of resolution
18577 * is acceptable. The J2000 method is best matched to the way
18578 * the argument is handled internally and will deliver the
18579 * optimum resolution. The MJD method and the date & time methods
18580 * are both good compromises between resolution and convenience.
18581 *
18582 * <li> The CIO locator s is the difference between the right ascensions
18583 * of the same point in two systems. The two systems are the GCRS
18584 * and the CIP,CIO, and the point is the ascending node of the
18585 * CIP equator. The CIO locator s remains a small fraction of
18586 * 1 arcsecond throughout 1900-2100.
18587 *
18588 * <li> The series used to compute s is in fact for s+XY/2, where X and Y
18589 * are the x and y components of the CIP unit vector; this series
18590 * is more compact than a direct series for s would be. The present
18591 * function uses the IAU 2000B truncated nutation model when
18592 * predicting the CIP position. The function jauS00a uses instead
18593 * the full IAU 2000A model, but with no significant increase in
18594 * accuracy and at some cost in speed.
18595 *</ol>
18596 *<p>Called:<ul>
18597 * <li>{@link #jauPnm00b} classical NPB matrix, IAU 2000B
18598 * <li>{@link #jauBpn2xy} extract CIP X,Y from the BPN matrix
18599 * <li>{@link #jauS00} the CIO locator s, given X,Y, IAU 2000A
18600 * </ul>
18601 *<p>References:
18602 *
18603 * <p>Capitaine, N., Chapront, J., Lambert, S. and Wallace, P.,
18604 * "Expressions for the Celestial Intermediate Pole and Celestial
18605 * Ephemeris Origin consistent with the IAU 2000A precession-
18606 * nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
18607 *
18608 * n.b. The celestial ephemeris origin (CEO) was renamed "celestial
18609 * intermediate origin" (CIO) by IAU 2006 Resolution 2.
18610 *
18611 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
18612 * IERS Technical Note No. 32, BKG (2004)
18613 *
18614 *@version 2010 January 18
18615 *
18616 * @since Release 20101201
18617 *
18618 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
18619 */
18620 public static double jauS00b(double date1, double date2)
18621 {
18622 double rbpn[][] = new double[3][3], s;
18623
18624
18625 /* Bias-precession-nutation-matrix, IAU 2000B. */
18626 rbpn = jauPnm00b(date1, date2);
18627
18628 /* Extract the CIP coordinates. */
18629 CelestialIntermediatePole cip = jauBpn2xy(rbpn);
18630
18631 /* Compute the CIO locator s, given the CIP coordinates. */
18632 s = jauS00(date1, date2, cip.x, cip.y);
18633
18634 return s;
18635
18636 }
18637
18638
18639 /**
18640 * The CIO locator s, positioning the Celestial Intermediate Origin on
18641 * the equator of the Celestial Intermediate Pole, given the CIP's X,Y
18642 * coordinates. Compatible with IAU 2006/2000A precession-nutation.
18643 *
18644 *<p>This function is derived from the International Astronomical Union's
18645 * SOFA (Standards Of Fundamental Astronomy) software collection.
18646 *
18647 *<p>Status: canonical model.
18648 *
18649 *<!-- Given: -->
18650 * @param date1 double TT as a 2-part Julian Date (Note 1)
18651 * @param date2 double TT as a 2-part Julian Date (Note 1)
18652 * @param x double CIP coordinates (Note 3)
18653 * @param y double CIP coordinates (Note 3)
18654 *
18655 * <!-- Returned (function value): -->
18656 * @return double the CIO locator s in radians (Note 2)
18657 *
18658 * <p>Notes:
18659 * <ol>
18660 *
18661 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
18662 * convenient way between the two arguments. For example,
18663 * JD(TT)=2450123.7 could be expressed in any of these ways,
18664 * among others:
18665 *<pre>
18666 * date1 date2
18667 *
18668 * 2450123.7 0.0 (JD method)
18669 * 2451545.0 -1421.3 (J2000 method)
18670 * 2400000.5 50123.2 (MJD method)
18671 * 2450123.5 0.2 (date & time method)
18672 *</pre>
18673 * The JD method is the most natural and convenient to use in
18674 * cases where the loss of several decimal digits of resolution
18675 * is acceptable. The J2000 method is best matched to the way
18676 * the argument is handled internally and will deliver the
18677 * optimum resolution. The MJD method and the date & time methods
18678 * are both good compromises between resolution and convenience.
18679 *
18680 * <li> The CIO locator s is the difference between the right ascensions
18681 * of the same point in two systems: the two systems are the GCRS
18682 * and the CIP,CIO, and the point is the ascending node of the
18683 * CIP equator. The quantity s remains below 0.1 arcsecond
18684 * throughout 1900-2100.
18685 *
18686 * <li> The series used to compute s is in fact for s+XY/2, where X and Y
18687 * are the x and y components of the CIP unit vector; this series
18688 * is more compact than a direct series for s would be. This
18689 * function requires X,Y to be supplied by the caller, who is
18690 * responsible for providing values that are consistent with the
18691 * supplied date.
18692 *
18693 * <li> The model is consistent with the "P03" precession (Capitaine et
18694 * al. 2003), adopted by IAU 2006 Resolution 1, 2006, and the
18695 * IAU 2000A nutation (with P03 adjustments).
18696 *</ol>
18697 *<p>Called:<ul>
18698 * <li>{@link #jauFal03} mean anomaly of the Moon
18699 * <li>{@link #jauFalp03} mean anomaly of the Sun
18700 * <li>{@link #jauFaf03} mean argument of the latitude of the Moon
18701 * <li>{@link #jauFad03} mean elongation of the Moon from the Sun
18702 * <li>{@link #jauFaom03} mean longitude of the Moon's ascending node
18703 * <li>{@link #jauFave03} mean longitude of Venus
18704 * <li>{@link #jauFae03} mean longitude of Earth
18705 * <li>{@link #jauFapa03} general accumulated precession in longitude
18706 * </ul>
18707 *<p>References:
18708 *
18709 * <p>Capitaine, N., Wallace, P.T. & Chapront, J., 2003, Astron.
18710 * Astrophys. 432, 355
18711 *
18712 * <p>McCarthy, D.D., Petit, G. (eds.) 2004, IERS Conventions (2003),
18713 * IERS Technical Note No. 32, BKG
18714 *
18715 *@version 2009 December 17
18716 *
18717 * @since Release 20101201
18718 *
18719 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
18720 */
18721 public static double jauS06(double date1, double date2, double x, double y)
18722 {
18723 /* Time since J2000.0, in Julian centuries */
18724 double t;
18725
18726 /* Miscellaneous */
18727 int i, j;
18728 double a, w0, w1, w2, w3, w4, w5;
18729
18730 /* Fundamental arguments */
18731 double fa[] = new double[8];
18732
18733 /* Returned value */
18734 double s;
18735
18736 /* --------------------- */
18737 /* The series for s+XY/2 */
18738 /* --------------------- */
18739
18740 /* Polynomial coefficients */
18741 final double sp[] = {
18742
18743 /* 1-6 */
18744 94.00e-6,
18745 3808.65e-6,
18746 -122.68e-6,
18747 -72574.11e-6,
18748 27.98e-6,
18749 15.62e-6
18750 };
18751
18752 /* Terms of order t^0 */
18753 final TERM s0[] = {
18754
18755 /* 1-10 */
18756 new TERM(new int[]{ 0, 0, 0, 0, 1, 0, 0, 0}, -2640.73e-6, 0.39e-6 ),
18757 new TERM(new int[]{ 0, 0, 0, 0, 2, 0, 0, 0}, -63.53e-6, 0.02e-6 ),
18758 new TERM(new int[]{ 0, 0, 2, -2, 3, 0, 0, 0}, -11.75e-6, -0.01e-6 ),
18759 new TERM(new int[]{ 0, 0, 2, -2, 1, 0, 0, 0}, -11.21e-6, -0.01e-6 ),
18760 new TERM(new int[]{ 0, 0, 2, -2, 2, 0, 0, 0}, 4.57e-6, 0.00e-6 ),
18761 new TERM(new int[]{ 0, 0, 2, 0, 3, 0, 0, 0}, -2.02e-6, 0.00e-6 ),
18762 new TERM(new int[]{ 0, 0, 2, 0, 1, 0, 0, 0}, -1.98e-6, 0.00e-6 ),
18763 new TERM(new int[]{ 0, 0, 0, 0, 3, 0, 0, 0}, 1.72e-6, 0.00e-6 ),
18764 new TERM(new int[]{ 0, 1, 0, 0, 1, 0, 0, 0}, 1.41e-6, 0.01e-6 ),
18765 new TERM(new int[]{ 0, 1, 0, 0, -1, 0, 0, 0}, 1.26e-6, 0.01e-6 ),
18766
18767 /* 11-20 */
18768 new TERM(new int[]{ 1, 0, 0, 0, -1, 0, 0, 0}, 0.63e-6, 0.00e-6 ),
18769 new TERM(new int[]{ 1, 0, 0, 0, 1, 0, 0, 0}, 0.63e-6, 0.00e-6 ),
18770 new TERM(new int[]{ 0, 1, 2, -2, 3, 0, 0, 0}, -0.46e-6, 0.00e-6 ),
18771 new TERM(new int[]{ 0, 1, 2, -2, 1, 0, 0, 0}, -0.45e-6, 0.00e-6 ),
18772 new TERM(new int[]{ 0, 0, 4, -4, 4, 0, 0, 0}, -0.36e-6, 0.00e-6 ),
18773 new TERM(new int[]{ 0, 0, 1, -1, 1, -8, 12, 0}, 0.24e-6, 0.12e-6 ),
18774 new TERM(new int[]{ 0, 0, 2, 0, 0, 0, 0, 0}, -0.32e-6, 0.00e-6 ),
18775 new TERM(new int[]{ 0, 0, 2, 0, 2, 0, 0, 0}, -0.28e-6, 0.00e-6 ),
18776 new TERM(new int[]{ 1, 0, 2, 0, 3, 0, 0, 0}, -0.27e-6, 0.00e-6 ),
18777 new TERM(new int[]{ 1, 0, 2, 0, 1, 0, 0, 0}, -0.26e-6, 0.00e-6 ),
18778
18779 /* 21-30 */
18780 new TERM(new int[]{ 0, 0, 2, -2, 0, 0, 0, 0}, 0.21e-6, 0.00e-6 ),
18781 new TERM(new int[]{ 0, 1, -2, 2, -3, 0, 0, 0}, -0.19e-6, 0.00e-6 ),
18782 new TERM(new int[]{ 0, 1, -2, 2, -1, 0, 0, 0}, -0.18e-6, 0.00e-6 ),
18783 new TERM(new int[]{ 0, 0, 0, 0, 0, 8,-13, -1}, 0.10e-6, -0.05e-6 ),
18784 new TERM(new int[]{ 0, 0, 0, 2, 0, 0, 0, 0}, -0.15e-6, 0.00e-6 ),
18785 new TERM(new int[]{ 2, 0, -2, 0, -1, 0, 0, 0}, 0.14e-6, 0.00e-6 ),
18786 new TERM(new int[]{ 0, 1, 2, -2, 2, 0, 0, 0}, 0.14e-6, 0.00e-6 ),
18787 new TERM(new int[]{ 1, 0, 0, -2, 1, 0, 0, 0}, -0.14e-6, 0.00e-6 ),
18788 new TERM(new int[]{ 1, 0, 0, -2, -1, 0, 0, 0}, -0.14e-6, 0.00e-6 ),
18789 new TERM(new int[]{ 0, 0, 4, -2, 4, 0, 0, 0}, -0.13e-6, 0.00e-6 ),
18790
18791 /* 31-33 */
18792 new TERM(new int[]{ 0, 0, 2, -2, 4, 0, 0, 0}, 0.11e-6, 0.00e-6 ),
18793 new TERM(new int[]{ 1, 0, -2, 0, -3, 0, 0, 0}, -0.11e-6, 0.00e-6 ),
18794 new TERM(new int[]{ 1, 0, -2, 0, -1, 0, 0, 0}, -0.11e-6, 0.00e-6 )
18795 };
18796
18797 /* Terms of order t^1 */
18798 final TERM s1[] = {
18799
18800 /* 1 - 3 */
18801 new TERM(new int[]{ 0, 0, 0, 0, 2, 0, 0, 0}, -0.07e-6, 3.57e-6 ),
18802 new TERM(new int[]{ 0, 0, 0, 0, 1, 0, 0, 0}, 1.73e-6, -0.03e-6 ),
18803 new TERM(new int[]{ 0, 0, 2, -2, 3, 0, 0, 0}, 0.00e-6, 0.48e-6 )
18804 };
18805
18806 /* Terms of order t^2 */
18807 final TERM s2[] = {
18808
18809 /* 1-10 */
18810 new TERM(new int[]{ 0, 0, 0, 0, 1, 0, 0, 0}, 743.52e-6, -0.17e-6 ),
18811 new TERM(new int[]{ 0, 0, 2, -2, 2, 0, 0, 0}, 56.91e-6, 0.06e-6 ),
18812 new TERM(new int[]{ 0, 0, 2, 0, 2, 0, 0, 0}, 9.84e-6, -0.01e-6 ),
18813 new TERM(new int[]{ 0, 0, 0, 0, 2, 0, 0, 0}, -8.85e-6, 0.01e-6 ),
18814 new TERM(new int[]{ 0, 1, 0, 0, 0, 0, 0, 0}, -6.38e-6, -0.05e-6 ),
18815 new TERM(new int[]{ 1, 0, 0, 0, 0, 0, 0, 0}, -3.07e-6, 0.00e-6 ),
18816 new TERM(new int[]{ 0, 1, 2, -2, 2, 0, 0, 0}, 2.23e-6, 0.00e-6 ),
18817 new TERM(new int[]{ 0, 0, 2, 0, 1, 0, 0, 0}, 1.67e-6, 0.00e-6 ),
18818 new TERM(new int[]{ 1, 0, 2, 0, 2, 0, 0, 0}, 1.30e-6, 0.00e-6 ),
18819 new TERM(new int[]{ 0, 1, -2, 2, -2, 0, 0, 0}, 0.93e-6, 0.00e-6 ),
18820
18821 /* 11-20 */
18822 new TERM(new int[]{ 1, 0, 0, -2, 0, 0, 0, 0}, 0.68e-6, 0.00e-6 ),
18823 new TERM(new int[]{ 0, 0, 2, -2, 1, 0, 0, 0}, -0.55e-6, 0.00e-6 ),
18824 new TERM(new int[]{ 1, 0, -2, 0, -2, 0, 0, 0}, 0.53e-6, 0.00e-6 ),
18825 new TERM(new int[]{ 0, 0, 0, 2, 0, 0, 0, 0}, -0.27e-6, 0.00e-6 ),
18826 new TERM(new int[]{ 1, 0, 0, 0, 1, 0, 0, 0}, -0.27e-6, 0.00e-6 ),
18827 new TERM(new int[]{ 1, 0, -2, -2, -2, 0, 0, 0}, -0.26e-6, 0.00e-6 ),
18828 new TERM(new int[]{ 1, 0, 0, 0, -1, 0, 0, 0}, -0.25e-6, 0.00e-6 ),
18829 new TERM(new int[]{ 1, 0, 2, 0, 1, 0, 0, 0}, 0.22e-6, 0.00e-6 ),
18830 new TERM(new int[]{ 2, 0, 0, -2, 0, 0, 0, 0}, -0.21e-6, 0.00e-6 ),
18831 new TERM(new int[]{ 2, 0, -2, 0, -1, 0, 0, 0}, 0.20e-6, 0.00e-6 ),
18832
18833 /* 21-25 */
18834 new TERM(new int[]{ 0, 0, 2, 2, 2, 0, 0, 0}, 0.17e-6, 0.00e-6 ),
18835 new TERM(new int[]{ 2, 0, 2, 0, 2, 0, 0, 0}, 0.13e-6, 0.00e-6 ),
18836 new TERM(new int[]{ 2, 0, 0, 0, 0, 0, 0, 0}, -0.13e-6, 0.00e-6 ),
18837 new TERM(new int[]{ 1, 0, 2, -2, 2, 0, 0, 0}, -0.12e-6, 0.00e-6 ),
18838 new TERM(new int[]{ 0, 0, 2, 0, 0, 0, 0, 0}, -0.11e-6, 0.00e-6 )
18839 };
18840
18841 /* Terms of order t^3 */
18842 final TERM s3[] = {
18843
18844 /* 1-4 */
18845 new TERM(new int[]{ 0, 0, 0, 0, 1, 0, 0, 0}, 0.30e-6, -23.42e-6 ),
18846 new TERM(new int[]{ 0, 0, 2, -2, 2, 0, 0, 0}, -0.03e-6, -1.46e-6 ),
18847 new TERM(new int[]{ 0, 0, 2, 0, 2, 0, 0, 0}, -0.01e-6, -0.25e-6 ),
18848 new TERM(new int[]{ 0, 0, 0, 0, 2, 0, 0, 0}, 0.00e-6, 0.23e-6 )
18849 };
18850
18851 /* Terms of order t^4 */
18852 final TERM s4[] = {
18853
18854 /* 1-1 */
18855 new TERM(new int[]{ 0, 0, 0, 0, 1, 0, 0, 0}, -0.26e-6, -0.01e-6 )
18856 };
18857
18858 /* Number of terms in the series */
18859 final int NS0 = s0.length;
18860 final int NS1 = s1.length;
18861 final int NS2 = s2.length;
18862 final int NS3 = s3.length;
18863 final int NS4 = s4.length;
18864
18865 /*--------------------------------------------------------------------*/
18866
18867 /* Interval between fundamental epoch J2000.0 and current date (JC). */
18868 t = ((date1 - DJ00) + date2) / DJC;
18869
18870 /* Fundamental Arguments (from IERS Conventions 2003) */
18871
18872 /* Mean anomaly of the Moon. */
18873 fa[0] = jauFal03(t);
18874
18875 /* Mean anomaly of the Sun. */
18876 fa[1] = jauFalp03(t);
18877
18878 /* Mean longitude of the Moon minus that of the ascending node. */
18879 fa[2] = jauFaf03(t);
18880
18881 /* Mean elongation of the Moon from the Sun. */
18882 fa[3] = jauFad03(t);
18883
18884 /* Mean longitude of the ascending node of the Moon. */
18885 fa[4] = jauFaom03(t);
18886
18887 /* Mean longitude of Venus. */
18888 fa[5] = jauFave03(t);
18889
18890 /* Mean longitude of Earth. */
18891 fa[6] = jauFae03(t);
18892
18893 /* General precession in longitude. */
18894 fa[7] = jauFapa03(t);
18895
18896 /* Evaluate s. */
18897 w0 = sp[0];
18898 w1 = sp[1];
18899 w2 = sp[2];
18900 w3 = sp[3];
18901 w4 = sp[4];
18902 w5 = sp[5];
18903
18904 for (i = NS0-1; i >= 0; i--) {
18905 a = 0.0;
18906 for (j = 0; j < 8; j++) {
18907 a += (double)s0[i].nfa[j] * fa[j];
18908 }
18909 w0 += s0[i].s * sin(a) + s0[i].c * cos(a);
18910 }
18911
18912 for (i = NS1-1; i >= 0; i--) {
18913 a = 0.0;
18914 for (j = 0; j < 8; j++) {
18915 a += (double)s1[i].nfa[j] * fa[j];
18916 }
18917 w1 += s1[i].s * sin(a) + s1[i].c * cos(a);
18918 }
18919
18920 for (i = NS2-1; i >= 0; i--) {
18921 a = 0.0;
18922 for (j = 0; j < 8; j++) {
18923 a += (double)s2[i].nfa[j] * fa[j];
18924 }
18925 w2 += s2[i].s * sin(a) + s2[i].c * cos(a);
18926 }
18927
18928 for (i = NS3-1; i >= 0; i--) {
18929 a = 0.0;
18930 for (j = 0; j < 8; j++) {
18931 a += (double)s3[i].nfa[j] * fa[j];
18932 }
18933 w3 += s3[i].s * sin(a) + s3[i].c * cos(a);
18934 }
18935
18936 for (i = NS4-1; i >= 0; i--) {
18937 a = 0.0;
18938 for (j = 0; j < 8; j++) {
18939 a += (double)s4[i].nfa[j] * fa[j];
18940 }
18941 w4 += s4[i].s * sin(a) + s4[i].c * cos(a);
18942 }
18943
18944 s = (w0 +
18945 (w1 +
18946 (w2 +
18947 (w3 +
18948 (w4 +
18949 w5 * t) * t) * t) * t) * t) * DAS2R - x*y/2.0;
18950
18951 return s;
18952
18953 }
18954
18955
18956 /**
18957 * The CIO locator s, positioning the Celestial Intermediate Origin on
18958 * the equator of the Celestial Intermediate Pole, using the IAU 2006
18959 * precession and IAU 2000A nutation models.
18960 *
18961 *<p>This function is derived from the International Astronomical Union's
18962 * SOFA (Standards Of Fundamental Astronomy) software collection.
18963 *
18964 *<p>Status: support function.
18965 *
18966 *<!-- Given: -->
18967 * @param date1 double TT as a 2-part Julian Date (Note 1)
18968 * @param date2 double TT as a 2-part Julian Date (Note 1)
18969 *
18970 * <!-- Returned (function value): -->
18971 * @return double the CIO locator s in radians (Note 2)
18972 *
18973 * <p>Notes:
18974 * <ol>
18975 *
18976 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
18977 * convenient way between the two arguments. For example,
18978 * JD(TT)=2450123.7 could be expressed in any of these ways,
18979 * among others:
18980 *<pre>
18981 * date1 date2
18982 *
18983 * 2450123.7 0.0 (JD method)
18984 * 2451545.0 -1421.3 (J2000 method)
18985 * 2400000.5 50123.2 (MJD method)
18986 * 2450123.5 0.2 (date & time method)
18987 *</pre>
18988 * The JD method is the most natural and convenient to use in
18989 * cases where the loss of several decimal digits of resolution
18990 * is acceptable. The J2000 method is best matched to the way
18991 * the argument is handled internally and will deliver the
18992 * optimum resolution. The MJD method and the date & time methods
18993 * are both good compromises between resolution and convenience.
18994 *
18995 * <li> The CIO locator s is the difference between the right ascensions
18996 * of the same point in two systems. The two systems are the GCRS
18997 * and the CIP,CIO, and the point is the ascending node of the
18998 * CIP equator. The CIO locator s remains a small fraction of
18999 * 1 arcsecond throughout 1900-2100.
19000 *
19001 * <li> The series used to compute s is in fact for s+XY/2, where X and Y
19002 * are the x and y components of the CIP unit vector; this series is
19003 * more compact than a direct series for s would be. The present
19004 * function uses the full IAU 2000A nutation model when predicting
19005 * the CIP position.
19006 *</ol>
19007 *<p>Called:<ul>
19008 * <li>{@link #jauPnm06a} classical NPB matrix, IAU 2006/2000A
19009 * <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
19010 * <li>{@link #jauS06} the CIO locator s, given X,Y, IAU 2006
19011 * </ul>
19012 *<p>References:
19013 *
19014 * <p>Capitaine, N., Chapront, J., Lambert, S. and Wallace, P.,
19015 * "Expressions for the Celestial Intermediate Pole and Celestial
19016 * Ephemeris Origin consistent with the IAU 2000A precession-
19017 * nutation model", Astron.Astrophys. 400, 1145-1154 (2003)
19018 *
19019 * n.b. The celestial ephemeris origin (CEO) was renamed "celestial
19020 * intermediate origin" (CIO) by IAU 2006 Resolution 2.
19021 *
19022 * <p>Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855
19023 *
19024 * <p>McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003),
19025 * IERS Technical Note No. 32, BKG
19026 *
19027 * <p>Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981
19028 *
19029 *@version 2010 January 18
19030 *
19031 * @since Release 20101201
19032 *
19033 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
19034 */
19035 public static double jauS06a(double date1, double date2)
19036 {
19037 double rnpb[][] = new double[3][3], s;
19038
19039
19040 /* Bias-precession-nutation-matrix, IAU 20006/2000A. */
19041 rnpb = jauPnm06a(date1, date2);
19042
19043 /* Extract the CIP coordinates. */
19044 CelestialIntermediatePole cip = jauBpn2xy(rnpb);
19045
19046 /* Compute the CIO locator s, given the CIP coordinates. */
19047 s = jauS06(date1, date2, cip.x, cip.y);
19048
19049 return s;
19050
19051 }
19052
19053
19054 /**
19055 * Convert spherical coordinates to Cartesian.
19056 *
19057 *<p>This function is derived from the International Astronomical Union's
19058 * SOFA (Standards Of Fundamental Astronomy) software collection.
19059 *
19060 *<p>Status: vector/matrix support function.
19061 *
19062 *<!-- Given: -->
19063 * @param theta double longitude angle (radians)
19064 * @param phi double latitude angle (radians)
19065 *
19066 *<!-- Returned: -->
19067 * @return c double[3] <u>returned</u> direction cosines
19068 *
19069 *@version 2008 October 28
19070 *
19071 * @since Release 20101201
19072 *
19073 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
19074 */
19075 public static double[] jauS2c(double theta, double phi )
19076 {
19077 double cp, c[] = new double[3];
19078
19079
19080 cp = cos(phi);
19081 c[0] = cos(theta) * cp;
19082 c[1] = sin(theta) * cp;
19083 c[2] = sin(phi);
19084
19085 return c;
19086
19087 }
19088
19089
19090 /**
19091 * Convert spherical polar coordinates to p-vector.
19092 *
19093 *<p>This function is derived from the International Astronomical Union's
19094 * SOFA (Standards Of Fundamental Astronomy) software collection.
19095 *
19096 *<p>Status: vector/matrix support function.
19097 *
19098 *<!-- Given: -->
19099 * @param theta double longitude angle (radians)
19100 * @param phi double latitude angle (radians)
19101 * @param r double radial distance
19102 *
19103 *<!-- Returned: -->
19104 * @return p double[3] <u>returned</u> Cartesian coordinates
19105 *
19106 *<p>Called:<ul>
19107 * <li>{@link #jauS2c} spherical coordinates to unit vector
19108 * <li>{@link #jauSxp} multiply p-vector by scalar
19109 * </ul>
19110 *@version 2008 May 11
19111 *
19112 * @since Release 20101201
19113 *
19114 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
19115 */
19116 public static double[] jauS2p(double theta, double phi, double r )
19117 {
19118 double p[];
19119 double u[] = new double[3];
19120
19121
19122 u = jauS2c(theta,phi);
19123 p = jauSxp(r,u);
19124
19125 return p;
19126
19127 }
19128
19129
19130 /**
19131 * Convert position/velocity from spherical to Cartesian coordinates.
19132 *
19133 *<p>This function is derived from the International Astronomical Union's
19134 * SOFA (Standards Of Fundamental Astronomy) software collection.
19135 *
19136 *<p>Status: vector/matrix support function.
19137 *
19138 *<!-- Given: -->
19139 * @param theta double longitude angle (radians)
19140 * @param phi double latitude angle (radians)
19141 * @param r double radial distance
19142 * @param td double rate of change of theta
19143 * @param pd double rate of change of phi
19144 * @param rd double rate of change of r
19145 *
19146 *<!-- Returned: -->
19147 * @return pv double[2][3] <u>returned</u> pv-vector
19148 *
19149 *@version 2008 May 25
19150 *
19151 * @since Release 20101201
19152 *
19153 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
19154 */
19155 public static double[][] jauS2pv(double theta, double phi, double r,
19156 double td, double pd, double rd)
19157 {
19158 double pv[][] = new double[2][3];
19159 double st, ct, sp, cp, rcp, x, y, rpd, w;
19160
19161
19162 st = sin(theta);
19163 ct = cos(theta);
19164 sp = sin(phi);
19165 cp = cos(phi);
19166 rcp = r * cp;
19167 x = rcp * ct;
19168 y = rcp * st;
19169 rpd = r * pd;
19170 w = rpd*sp - cp*rd;
19171
19172 pv[0][0] = x;
19173 pv[0][1] = y;
19174 pv[0][2] = r * sp;
19175 pv[1][0] = -y*td - w*ct;
19176 pv[1][1] = x*td - w*st;
19177 pv[1][2] = rpd*cp + sp*rd;
19178
19179 return pv;
19180
19181 }
19182
19183
19184 /**
19185 * Multiply a pv-vector by two scalars.
19186 *
19187 *<p>This function is derived from the International Astronomical Union's
19188 * SOFA (Standards Of Fundamental Astronomy) software collection.
19189 *
19190 *<p>Status: vector/matrix support function.
19191 *
19192 *<!-- Given: -->
19193 * @param s1 double scalar to multiply position component by
19194 * @param s2 double scalar to multiply velocity component by
19195 * @param pv double[2][3] pv-vector
19196 *
19197 *<!-- Returned: -->
19198 * @return spv double[2][3] <u>returned</u> pv-vector: p scaled by s1, v scaled by s2
19199 *
19200 * Note:
19201 * It is permissible for pv and spv to be the same array.
19202 *
19203 *<p>Called:<ul>
19204 * <li>{@link #jauSxp} multiply p-vector by scalar
19205 * </ul>
19206 *@version 2008 October 28
19207 *
19208 * @since Release 20101201
19209 *
19210 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
19211 */
19212 public static double[][] jauS2xpv(double s1, double s2, double pv[][])
19213 {
19214 double spv[][] = new double[2][3];
19215 spv[0] = jauSxp(s1, pv[0]);
19216 spv[1] =jauSxp(s2, pv[1]);
19217
19218 return spv;
19219
19220 }
19221
19222
19223 /**
19224 * Angular separation between two p-vectors.
19225 *
19226 *<p>This function is derived from the International Astronomical Union's
19227 * SOFA (Standards Of Fundamental Astronomy) software collection.
19228 *
19229 *<p>Status: vector/matrix support function.
19230 *
19231 *<!-- Given: -->
19232 * @param a double[3] first p-vector (not necessarily unit length)
19233 * @param b double[3] second p-vector (not necessarily unit length)
19234 *
19235 * <!-- Returned (function value): -->
19236 * @return double angular separation (radians, always positive)
19237 *
19238 * <p>Notes:
19239 * <ol>
19240 *
19241 * <li> If either vector is null, a zero result is returned.
19242 *
19243 * <li> The angular separation is most simply formulated in terms of
19244 * scalar product. However, this gives poor accuracy for angles
19245 * near zero and pi. The present algorithm uses both cross product
19246 * and dot product, to deliver full accuracy whatever the size of
19247 * the angle.
19248 *</ol>
19249 *<p>Called:<ul>
19250 * <li>{@link #jauPxp} vector product of two p-vectors
19251 * <li>{@link #jauPm} modulus of p-vector
19252 * <li>{@link #jauPdp} scalar product of two p-vectors
19253 * </ul>
19254 *@version 2008 May 22
19255 *
19256 * @since Release 20101201
19257 *
19258 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
19259 */
19260 public static double jauSepp(double a[] , double b[] )
19261 {
19262 double axb[] = new double[3], ss, cs, s;
19263
19264
19265 /* Sine of angle between the vectors, multiplied by the two moduli. */
19266 axb = jauPxp(a,b);
19267 ss = jauPm(axb);
19268
19269 /* Cosine of the angle, multiplied by the two moduli. */
19270 cs = jauPdp(a, b);
19271
19272 /* The angle. */
19273 s = ((ss != 0.0) || (cs != 0.0)) ? atan2(ss, cs) : 0.0;
19274
19275 return s;
19276
19277 }
19278
19279
19280 /**
19281 * Angular separation between two sets of spherical coordinates.
19282 *
19283 *<p>This function is derived from the International Astronomical Union's
19284 * SOFA (Standards Of Fundamental Astronomy) software collection.
19285 *
19286 *<p>Status: vector/matrix support function.
19287 *
19288 *<!-- Given: -->
19289 * @param al double first longitude (radians)
19290 * @param ap double first latitude (radians)
19291 * @param bl double second longitude (radians)
19292 * @param bp double second latitude (radians)
19293 *
19294 * <!-- Returned (function value): -->
19295 * @return double angular separation (radians)
19296 *
19297 *<p>Called:<ul>
19298 * <li>{@link #jauS2c} spherical coordinates to unit vector
19299 * <li>{@link #jauSepp} angular separation between two p-vectors
19300 * </ul>
19301 *@version 2008 May 16
19302 *
19303 * @since Release 20101201
19304 *
19305 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
19306 */
19307 public static double jauSeps(double al, double ap, double bl, double bp)
19308 {
19309 double ac[] = new double[3], bc[] = new double[3], s;
19310
19311
19312 /* Spherical to Cartesian. */
19313 ac = jauS2c(al,ap);
19314 bc = jauS2c(bl,bp);
19315
19316 /* Angle between the vectors. */
19317 s = jauSepp(ac, bc);
19318
19319 return s;
19320
19321 }
19322
19323
19324 /**
19325 * The TIO locator s', positioning the Terrestrial Intermediate Origin
19326 * on the equator of the Celestial Intermediate Pole.
19327 *
19328 *<p>This function is derived from the International Astronomical Union's
19329 * SOFA (Standards Of Fundamental Astronomy) software collection.
19330 *
19331 *<p>Status: canonical model.
19332 *
19333 *<!-- Given: -->
19334 * @param date1 double TT as a 2-part Julian Date (Note 1)
19335 * @param date2 double TT as a 2-part Julian Date (Note 1)
19336 *
19337 * <!-- Returned (function value): -->
19338 * @return double the TIO locator s' in radians (Note 2)
19339 *
19340 * <p>Notes:
19341 * <ol>
19342 *
19343 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
19344 * convenient way between the two arguments. For example,
19345 * JD(TT)=2450123.7 could be expressed in any of these ways,
19346 * among others:
19347 *<pre>
19348 * date1 date2
19349 *
19350 * 2450123.7 0.0 (JD method)
19351 * 2451545.0 -1421.3 (J2000 method)
19352 * 2400000.5 50123.2 (MJD method)
19353 * 2450123.5 0.2 (date & time method)
19354 *</pre>
19355 * The JD method is the most natural and convenient to use in
19356 * cases where the loss of several decimal digits of resolution
19357 * is acceptable. The J2000 method is best matched to the way
19358 * the argument is handled internally and will deliver the
19359 * optimum resolution. The MJD method and the date & time methods
19360 * are both good compromises between resolution and convenience.
19361 *
19362 * <li> The TIO locator s' is obtained from polar motion observations by
19363 * numerical integration, and so is in essence unpredictable.
19364 * However, it is dominated by a secular drift of about
19365 * 47 microarcseconds per century, which is the approximation
19366 * evaluated by the present function.
19367 *</ol>
19368 *<p>Reference:
19369 *
19370 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
19371 * IERS Technical Note No. 32, BKG (2004)
19372 *
19373 *@version 2008 May 24
19374 *
19375 * @since Release 20101201
19376 *
19377 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
19378 */
19379 public static double jauSp00(double date1, double date2)
19380 {
19381 double t, sp;
19382
19383
19384 /* Interval between fundamental epoch J2000.0 and current date (JC). */
19385 t = ((date1 - DJ00) + date2) / DJC;
19386
19387 /* Approximate s'. */
19388 sp = -47e-6 * t * DAS2R;
19389
19390 return sp;
19391
19392 }
19393
19394
19395 /**
19396 * Star proper motion: update star catalog data for space motion.
19397 *
19398 *<p>This function is derived from the International Astronomical Union's
19399 * SOFA (Standards Of Fundamental Astronomy) software collection.
19400 *
19401 *<p>Status: support function.
19402 *
19403 *<!-- Given: -->
19404 * @param ra1 double right ascension (radians), before
19405 * @param dec1 double declination (radians), before
19406 * @param pmr1 double RA proper motion (radians/year), before
19407 * @param pmd1 double Dec proper motion (radians/year), before
19408 * @param px1 double parallax (arcseconds), before
19409 * @param rv1 double radial velocity (km/s, +ve = receding), before
19410 * @param ep1a double "before" epoch, part A (Note 1)
19411 * @param ep1b double "before" epoch, part B (Note 1)
19412 * @param ep2a double "after" epoch, part A (Note 1)
19413 * @param ep2b double "after" epoch, part B (Note 1)
19414 *
19415 *<!-- Returned: -->
19416 * @return ra2 double <u>returned</u> right ascension (radians), after
19417 * dec2 double <u>returned</u> declination (radians), after
19418 * pmr2 double <u>returned</u> RA proper motion (radians/year), after
19419 * pmd2 double <u>returned</u> Dec proper motion (radians/year), after
19420 * px2 double <u>returned</u> parallax (arcseconds), after
19421 * rv2 double <u>returned</u> radial velocity (km/s, +ve = receding), after
19422 *
19423 * <!-- Returned (function value): -->
19424 * @return int status:
19425 * -1 = system error (should not occur)
19426 * 0 = no warnings or errors
19427 * 1 = distance overridden (Note 6)
19428 * 2 = excessive velocity (Note 7)
19429 * 4 = solution didn't converge (Note 8)
19430 * else = binary logical OR of the above warnings
19431 *FIXME need to return the status as well.
19432 * <p>Notes:
19433 * <ol>
19434 *
19435 * <li> The starting and ending TDB dates ep1a+ep1b and ep2a+ep2b are
19436 * Julian Dates, apportioned in any convenient way between the two
19437 * parts (A and B). For example, JD(TDB)=2450123.7 could be
19438 * expressed in any of these ways, among others:
19439 *<pre>
19440 * epna epnb
19441 *
19442 * 2450123.7 0.0 (JD method)
19443 * 2451545.0 -1421.3 (J2000 method)
19444 * 2400000.5 50123.2 (MJD method)
19445 * 2450123.5 0.2 (date & time method)
19446 *</pre>
19447 * The JD method is the most natural and convenient to use in
19448 * cases where the loss of several decimal digits of resolution
19449 * is acceptable. The J2000 method is best matched to the way
19450 * the argument is handled internally and will deliver the
19451 * optimum resolution. The MJD method and the date & time methods
19452 * are both good compromises between resolution and convenience.
19453 *
19454 * <li> In accordance with normal star-catalog conventions, the object's
19455 * right ascension and declination are freed from the effects of
19456 * secular aberration. The frame, which is aligned to the catalog
19457 * equator and equinox, is Lorentzian and centered on the SSB.
19458 *
19459 * The proper motions are the rate of change of the right ascension
19460 * and declination at the catalog epoch and are in radians per TDB
19461 * Julian year.
19462 *
19463 * The parallax and radial velocity are in the same frame.
19464 *
19465 * <li> Care is needed with units. The star coordinates are in radians
19466 * and the proper motions in radians per Julian year, but the
19467 * parallax is in arcseconds.
19468 *
19469 * <li> The RA proper motion is in terms of coordinate angle, not true
19470 * angle. If the catalog uses arcseconds for both RA and Dec proper
19471 * motions, the RA proper motion will need to be divided by cos(Dec)
19472 * before use.
19473 *
19474 * <li> Straight-line motion at constant speed, in the inertial frame,
19475 * is assumed.
19476 *
19477 * <li> An extremely small (or zero or negative) parallax is interpreted
19478 * to mean that the object is on the "celestial sphere", the radius
19479 * of which is an arbitrary (large) value (see the jauStarpv
19480 * function for the value used). When the distance is overridden in
19481 * this way, the status, initially zero, has 1 added to it.
19482 *
19483 * <li> If the space velocity is a significant fraction of c (see the
19484 * constant VMAX in the function jauStarpv), it is arbitrarily set
19485 * to zero. When this action occurs, 2 is added to the status.
19486 *
19487 * <li> The relativistic adjustment carried out in the jauStarpv function
19488 * involves an iterative calculation. If the process fails to
19489 * converge within a set number of iterations, 4 is added to the
19490 * status.
19491 *</ol>
19492 *<p>Called:<ul>
19493 * <li>{@link #jauStarpv} star catalog data to space motion pv-vector
19494 * <li>{@link #jauPvu} update a pv-vector
19495 * <li>{@link #jauPdp} scalar product of two p-vectors
19496 * <li>{@link #jauPvstar} space motion pv-vector to star catalog data
19497 * </ul>
19498 *@version 2008 May 16
19499 *
19500 * @since Release 20101201
19501 *
19502 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
19503 */
19504 public static CatalogCoords jauStarpm(double ra1, double dec1,
19505 double pmr1, double pmd1, double px1, double rv1,
19506 double ep1a, double ep1b, double ep2a, double ep2b) throws JSOFAInternalError
19507 {
19508 double pv1[][] = new double[2][3], tl1, dt, pv[][] = new double[2][3], r2, rdv, v2, c2mv2, tl2,
19509 pv2[][] = new double[2][3];
19510 jauStarpv(ra1, dec1, pmr1, pmd1, px1, rv1, pv1);
19511
19512 /* Light time when observed (days). */
19513 tl1 = jauPm(pv1[0]) / DC;
19514
19515 /* Time interval, "before" to "after" (days). */
19516 dt = (ep2a - ep1a) + (ep2b - ep1b);
19517
19518 /* Move star along track from the "before" observed position to the */
19519 /* "after" geometric position. */
19520 pv = jauPvu(dt + tl1, pv1);
19521
19522 /* From this geometric position, deduce the observed light time (days) */
19523 /* at the "after" epoch (with theoretically unneccessary error check). */
19524 r2 = jauPdp(pv[0], pv[0]);
19525 rdv = jauPdp(pv[0], pv[1]);
19526 v2 = jauPdp(pv[1], pv[1]);
19527 c2mv2 = DC*DC - v2;
19528 if (c2mv2 <= 0) throw new JSOFAInternalError("internal error", -1);
19529 tl2 = (-rdv + sqrt(rdv*rdv + c2mv2*r2)) / c2mv2;
19530
19531 /* Move the position along track from the observed place at the */
19532 /* "before" epoch to the observed place at the "after" epoch. */
19533 pv2 =jauPvu(dt + (tl1 - tl2), pv1 );
19534
19535 /* Space motion pv-vector to RA,Dec etc. at the "after" epoch. */
19536 CatalogCoords cat = jauPvstar(pv2);
19537
19538 return cat;
19539
19540 }
19541
19542
19543 /**
19544 * Convert star catalog coordinates to position+velocity vector.
19545 *
19546 *<p>This function is derived from the International Astronomical Union's
19547 * SOFA (Standards Of Fundamental Astronomy) software collection.
19548 *
19549 *<p>Status: support function.
19550 *
19551 * Given (Note 1):
19552 * @param ra double right ascension (radians)
19553 * @param dec double declination (radians)
19554 * @param pmr double RA proper motion (radians/year)
19555 * @param pmd double Dec proper motion (radians/year)
19556 * @param px double parallax (arcseconds)
19557 * @param rv double radial velocity (km/s, positive = receding)
19558 *
19559 * Returned (Note 2):
19560 * @param pv double[2][3] pv-vector (au, au/day)
19561 *
19562 * <!-- Returned (function value): -->
19563 * @return int status:
19564 * 0 = no warnings
19565 * 1 = distance overridden (Note 6)
19566 * 2 = excessive speed (Note 7)
19567 * 4 = solution didn't converge (Note 8)
19568 * else = binary logical OR of the above
19569 *
19570 * <p>Notes:
19571 * <ol>
19572 *
19573 * <li> The star data accepted by this function are "observables" for an
19574 * imaginary observer at the solar-system barycenter. Proper motion
19575 * and radial velocity are, strictly, in terms of barycentric
19576 * coordinate time, TCB. For most practical applications, it is
19577 * permissible to neglect the distinction between TCB and ordinary
19578 * "proper" time on Earth (TT/TAI). The result will, as a rule, be
19579 * limited by the intrinsic accuracy of the proper-motion and
19580 * radial-velocity data; moreover, the pv-vector is likely to be
19581 * merely an intermediate result, so that a change of time unit
19582 * would cancel out overall.
19583 *
19584 * In accordance with normal star-catalog conventions, the object's
19585 * right ascension and declination are freed from the effects of
19586 * secular aberration. The frame, which is aligned to the catalog
19587 * equator and equinox, is Lorentzian and centered on the SSB.
19588 *
19589 * <li> The resulting position and velocity pv-vector is with respect to
19590 * the same frame and, like the catalog coordinates, is freed from
19591 * the effects of secular aberration. Should the "coordinate
19592 * direction", where the object was located at the catalog epoch, be
19593 * required, it may be obtained by calculating the magnitude of the
19594 * position vector pv[0][0-2] dividing by the speed of light in
19595 * au/day to give the light-time, and then multiplying the space
19596 * velocity pv[1][0-2] by this light-time and adding the result to
19597 * pv[0][0-2].
19598 *
19599 * Summarizing, the pv-vector returned is for most stars almost
19600 * identical to the result of applying the standard geometrical
19601 * "space motion" transformation. The differences, which are the
19602 * subject of the Stumpff paper referenced below, are:
19603 *
19604 * (i) In stars with significant radial velocity and proper motion,
19605 * the constantly changing light-time distorts the apparent proper
19606 * motion. Note that this is a classical, not a relativistic,
19607 * effect.
19608 *
19609 * (ii) The transformation complies with special relativity.
19610 *
19611 * <li> Care is needed with units. The star coordinates are in radians
19612 * and the proper motions in radians per Julian year, but the
19613 * parallax is in arcseconds; the radial velocity is in km/s, but
19614 * the pv-vector result is in au and au/day.
19615 *
19616 * <li> The RA proper motion is in terms of coordinate angle, not true
19617 * angle. If the catalog uses arcseconds for both RA and Dec proper
19618 * motions, the RA proper motion will need to be divided by cos(Dec)
19619 * before use.
19620 *
19621 * <li> Straight-line motion at constant speed, in the inertial frame,
19622 * is assumed.
19623 *
19624 * <li> An extremely small (or zero or negative) parallax is interpreted
19625 * to mean that the object is on the "celestial sphere", the radius
19626 * of which is an arbitrary (large) value (see the constant PXMIN).
19627 * When the distance is overridden in this way, the status,
19628 * initially zero, has 1 added to it.
19629 *
19630 * <li> If the space velocity is a significant fraction of c (see the
19631 * constant VMAX), it is arbitrarily set to zero. When this action
19632 * occurs, 2 is added to the status.
19633 *
19634 * <li> The relativistic adjustment involves an iterative calculation.
19635 * If the process fails to converge within a set number (IMAX) of
19636 * iterations, 4 is added to the status.
19637 *
19638 * <li> The inverse transformation is performed by the function
19639 * jauPvstar.
19640 *</ol>
19641 *<p>Called:<ul>
19642 * <li>{@link #jauS2pv} spherical coordinates to pv-vector
19643 * <li>{@link #jauPm} modulus of p-vector
19644 * <li>{@link #jauZp} zero p-vector
19645 * <li>{@link #jauPn} decompose p-vector into modulus and direction
19646 * <li>{@link #jauPdp} scalar product of two p-vectors
19647 * <li>{@link #jauSxp} multiply p-vector by scalar
19648 * <li>{@link #jauPmp} p-vector minus p-vector
19649 * <li>{@link #jauPpp} p-vector plus p-vector
19650 * </ul>
19651 *<p>Reference:
19652 *
19653 * Stumpff, P., 1985, Astron.Astrophys. 144, 232-240.
19654 *
19655 *@version 2009 July 6
19656 *
19657 * @since Release 20101201
19658 *
19659 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
19660 */
19661 public static int jauStarpv(double ra, double dec,
19662 double pmr, double pmd, double px, double rv,
19663 double pv[][])
19664 {
19665 /* Smallest allowed parallax */
19666 final double PXMIN = 1e-7;
19667
19668 /* Largest allowed speed (fraction of c) */
19669 final double VMAX = 0.5;
19670
19671 /* Maximum number of iterations for relativistic solution */
19672 final int IMAX = 100;
19673
19674 int i, iwarn;
19675 double w, r, rd, rad, decd, v, x[] = new double[3], usr[] = new double[3], ust[] = new double[3],
19676 vsr, vst, betst, betsr, bett, betr,
19677 dd, ddel, ur[] = new double[3], ut[] = new double[3],
19678 d = 0.0, del = 0.0, /* to prevent */
19679 odd = 0.0, oddel = 0.0, /* compiler */
19680 od = 0.0, odel = 0.0; /* warnings */
19681
19682
19683 /* Distance (au). */
19684 if (px >= PXMIN) {
19685 w = px;
19686 iwarn = 0;
19687 } else {
19688 w = PXMIN;
19689 iwarn = 1;
19690 }
19691 r = DR2AS / w;
19692
19693 /* Radial velocity (au/day). */
19694 rd = DAYSEC * rv * 1e3 / DAU;
19695
19696 /* Proper motion (radian/day). */
19697 rad = pmr / DJY;
19698 decd = pmd / DJY;
19699
19700 /* To pv-vector (au,au/day). */
19701 double[][] pvt = jauS2pv(ra, dec, r, rad, decd, rd);
19702 jauCpv(pvt,pv);
19703
19704 /* If excessive velocity, arbitrarily set it to zero. */
19705 v = jauPm(pv[1]);
19706 if (v / DC > VMAX) {
19707 jauZp(pv[1]);
19708 iwarn += 2;
19709 }
19710
19711 /* Isolate the radial component of the velocity (au/day). */
19712 NormalizedVector nv = jauPn(pv[0]);
19713 w = nv.r;
19714 x = nv.u;
19715 vsr = jauPdp(x, pv[1]);
19716 usr = jauSxp(vsr,x);
19717
19718 /* Isolate the transverse component of the velocity (au/day). */
19719 ust = jauPmp(pv[1], usr);
19720 vst = jauPm(ust);
19721
19722 /* Special-relativity dimensionless parameters. */
19723 betsr = vsr / DC;
19724 betst = vst / DC;
19725
19726 /* Determine the inertial-to-observed relativistic correction terms. */
19727 bett = betst;
19728 betr = betsr;
19729 for (i = 0; i < IMAX; i++) {
19730 d = 1.0 + betr;
19731 del = sqrt(1.0 - betr*betr - bett*bett) - 1.0;
19732 betr = d * betsr + del;
19733 bett = d * betst;
19734 if (i > 0) {
19735 dd = abs(d - od);
19736 ddel = abs(del - odel);
19737 if ((i > 1) && (dd >= odd) && (ddel >= oddel)) break;
19738 odd = dd;
19739 oddel = ddel;
19740 }
19741 od = d;
19742 odel = del;
19743 }
19744 if (i >= IMAX) iwarn += 4;
19745
19746 /* Replace observed radial velocity with inertial value. */
19747 w = (betsr != 0.0) ? d + del / betsr : 1.0;
19748 ur = jauSxp(w,usr);
19749
19750 /* Replace observed tangential velocity with inertial value. */
19751 ut = jauSxp(d,ust);
19752
19753 /* Combine the two to obtain the inertial space velocity. */
19754 pv[1] = jauPpp(ur, ut);
19755
19756 /* Return the status. */
19757 return iwarn;
19758
19759 }
19760
19761
19762 /**
19763 * Multiply a p-vector by a scalar.
19764 *
19765 *<p>This function is derived from the International Astronomical Union's
19766 * SOFA (Standards Of Fundamental Astronomy) software collection.
19767 *
19768 *<p>Status: vector/matrix support function.
19769 *
19770 *<!-- Given: -->
19771 * @param s double scalar
19772 * @param p double[3] p-vector
19773 *
19774 *<!-- Returned: -->
19775 * @return sp double[3] <u>returned</u> s * p
19776 *
19777 *
19778 *
19779 *@version 2008 October 28
19780 *
19781 * @since Release 20101201
19782 *
19783 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
19784 */
19785 public static double[] jauSxp(double s, double p[])
19786 {
19787 double sp[] = new double[3];
19788 sp[0] = s * p[0];
19789 sp[1] = s * p[1];
19790 sp[2] = s * p[2];
19791
19792 return sp;
19793
19794 }
19795
19796
19797 /**
19798 * Multiply a pv-vector by a scalar.
19799 *
19800 *<p>This function is derived from the International Astronomical Union's
19801 * SOFA (Standards Of Fundamental Astronomy) software collection.
19802 *
19803 *<p>Status: vector/matrix support function.
19804 *
19805 *<!-- Given: -->
19806 * @param s double scalar
19807 * @param pv double[2][3] pv-vector
19808 *
19809 *<!-- Returned: -->
19810 * @return spv double[2][3] <u>returned</u> s * pv
19811 *
19812 * Note:
19813 * It is permissible for pv and psv to be the same array
19814 *
19815 *<p>Called:<ul>
19816 * <li>{@link #jauS2xpv} multiply pv-vector by two scalars
19817 * </ul>
19818 *@version 2008 October 28
19819 *
19820 * @since Release 20101201
19821 *
19822 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
19823 */
19824 public static double[][] jauSxpv(double s, double pv[][])
19825 {
19826 double spv[][];
19827 spv = jauS2xpv(s, s, pv);
19828
19829 return spv;
19830
19831 }
19832
19833 /**
19834 *
19835 * Time scale transformation: International Atomic Time, TAI, to
19836 * Terrestrial Time, TT.
19837 *
19838 * <p>This function is derived from the International Astronomical Union's
19839 * SOFA (Standards of Fundamental Astronomy) software collection.
19840 *
19841 *<p>Status: canonical.
19842 *
19843 *<!-- Given: -->
19844 * @param tai1 double TAI as a 2-part Julian Date
19845 * @param tai2 double TAI as a 2-part Julian Date
19846 *
19847 *<!-- Returned:-->
19848 * @return JulianDate TT as a 2-part Julian Date
19849 *
19850 *
19851 * Note:
19852 *
19853 * tai1+tai2 is Julian Date, apportioned in any convenient way
19854 * between the two arguments, for example where tai1 is the Julian
19855 * Day Number and tai2 is the fraction of a day. The returned
19856 * tt1,tt2 follow suit.
19857 *
19858 *<p>References:
19859 *
19860 * McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
19861 * IERS Technical Note No. 32, BKG (2004)
19862 *
19863 * Explanatory Supplement to the Astronomical Almanac,
19864 * P. Kenneth Seidelmann (ed), University Science Books (1992)
19865 *
19866 *@version 2010 May 16
19867 *
19868 *@since SOFA release 2010-12-01
19869 *
19870 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
19871 */
19872 public static JulianDate jauTaitt(double tai1, double tai2)
19873 {
19874
19875 double tt1, tt2;
19876 /* TT minus TAI (days). */
19877 final double dtat = TTMTAI / DAYSEC;
19878
19879 /* Result, safeguarding precision. */
19880
19881 if ( tai1 > tai2 ) {
19882 tt1 = tai1;
19883 tt2 = tai2 + dtat;
19884 } else {
19885 tt1 = tai1 + dtat;
19886 tt2 = tai2;
19887 }
19888
19889
19890 return new JulianDate(tt1, tt2);
19891 };
19892
19893 /**
19894 *
19895 * Time scale transformation: International Atomic Time, TAI, to
19896 * Universal Time, UT1.
19897 *
19898 * <p>This function is derived from the International Astronomical Union's
19899 * SOFA (Standards of Fundamental Astronomy) software collection.
19900 *
19901 *<p>Status: canonical.
19902 *
19903 *<!-- Given: -->
19904 * @param tai1 double TAI as a 2-part Julian Date
19905 * @param tai2 double TAI as a 2-part Julian Date
19906 * @param dta double UT1-TAI in seconds
19907 *
19908 *<!-- Returned:-->
19909 * @return UT1 as a 2-part Julian Date
19910 *
19911 *
19912 *<p>Notes:
19913 * <ol>
19914 * <li> tai1+tai2 is Julian Date, apportioned in any convenient way
19915 * between the two arguments, for example where tai1 is the Julian
19916 * Day Number and tai2 is the fraction of a day. The returned
19917 * UT11,UT12 follow suit.
19918 *
19919 * <li> The argument dta, i.e. UT1-TAI, is an observed quantity, and is
19920 * available from IERS tabulations.
19921 * </ol>
19922 * Reference:
19923 *
19924 * Explanatory Supplement to the Astronomical Almanac,
19925 * P. Kenneth Seidelmann (ed), University Science Books (1992)
19926 *
19927 *@version 2010 May 16
19928 *
19929 *@since SOFA release 2010-12-01
19930 *
19931 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
19932 *
19933 */
19934 public static JulianDate jauTaiut1(double tai1, double tai2, double dta)
19935
19936 {
19937 double dtad,ut11, ut12;
19938
19939
19940 /* Result, safeguarding precision. */
19941 dtad = dta / DAYSEC;
19942 if ( tai1 > tai2 ) {
19943 ut11 = tai1;
19944 ut12 = tai2 + dtad;
19945 } else {
19946 ut11 = tai1 + dtad;
19947 ut12 = tai2;
19948 }
19949
19950 return new JulianDate(ut11, ut12);
19951 };
19952
19953 /**
19954 *
19955 * Time scale transformation: International Atomic Time, TAI, to
19956 * Coordinated Universal Time, UTC.
19957 *
19958 * <p>This function is derived from the International Astronomical Union's
19959 * SOFA (Standards of Fundamental Astronomy) software collection.
19960 *
19961 *<p>Status: canonical.
19962 *
19963 *<!-- Given: -->
19964 * @param tai1 TAI as a 2-part Julian Date (Note 1)
19965 * @param tai2 TAI as a 2-part Julian Date (Note 1)
19966 *
19967 *<!-- Returned:-->
19968 * @return UTC as a 2-part quasi Julian Date (Notes 1-3)
19969 *
19970 * Returned (function value):
19971 * int status: +1 = dubious year (Note 4)
19972 * 0 = OK
19973 * -1 = unacceptable date
19974 *
19975 *<p>Notes:</p>
19976 * <ol>
19977 * <li> tai1+tai2 is Julian Date, apportioned in any convenient way
19978 * between the two arguments, for example where tai1 is the Julian
19979 * Day Number and tai2 is the fraction of a day. The returned utc1
19980 * and utc2 form an analogous pair, except that a special convention
19981 * is used, to deal with the problem of leap seconds - see the next
19982 * note.
19983 *
19984 * <li> JD cannot unambiguously represent UTC during a leap second unless
19985 * special measures are taken. The convention in the present
19986 * function is that the JD day represents UTC days whether the
19987 * length is 86399, 86400 or 86401 SI seconds.
19988 *
19989 * <li> The function jauD2dtf can be used to transform the UTC quasi-JD
19990 * into calendar date and clock time, including UTC leap second
19991 * handling.
19992 *
19993 * <li> The warning status "dubious year" flags UTCs that predate the
19994 * introduction of the time scale and that are too far in the future
19995 * to be trusted. See jauDat for further details.
19996 * </ol>
19997 * Called:
19998 * <ul>
19999 * <li>{@link #jauJd2cal} JD to Gregorian calendar
20000 * <li>{@link #jauDat} delta(AT) = TAI-UTC
20001 * <li>{@link #jauCal2jd} Gregorian calendar to JD
20002 *</ul>
20003 *<p>References:
20004 *
20005 * McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
20006 * IERS Technical Note No. 32, BKG (2004)
20007 *
20008 * Explanatory Supplement to the Astronomical Almanac,
20009 * P. Kenneth Seidelmann (ed), University Science Books (1992)
20010 *
20011 *@version 2010 May 16
20012 *
20013 *@since SOFA release 2010-12-01
20014 *
20015 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
20016 * @throws JSOFAIllegalParameter
20017 * @throws JSOFAInternalError an internal error has occured
20018 */
20019 public static JulianDate jauTaiutc(double tai1, double tai2) throws JSOFAIllegalParameter, JSOFAInternalError
20020 {
20021 boolean big1;
20022 int i;
20023 double a1, a2,dats1, ddats, dats2, datd = 0.0, as1, as2, da, d1, d2, fd;
20024 double utc1, utc2;
20025
20026
20027 /* Put the two parts of the TAI into big-first order. */
20028 big1 = ( tai1 >= tai2 );
20029 if ( big1 ) {
20030 a1 = tai1;
20031 a2 = tai2;
20032 } else {
20033 a1 = tai2;
20034 a2 = tai1;
20035 }
20036
20037 /* See if the TAI can possibly be in a leap-second day. */
20038 d1 = a1;
20039 dats1 = 0.0;
20040 for ( i = -1; i <= 3; i++ ) {
20041 d2 = a2 + (double) i;
20042 Calendar dt;
20043 dt = jauJd2cal(d1, d2 );
20044 dats2 = jauDat(dt.iy, dt.im, dt.id, 0.0);
20045 //FIXME if ( js < 0 ) return -1;
20046 if ( i == -1 ) dats1 = dats2;
20047 ddats = dats2 - dats1;
20048 datd = dats1 / DAYSEC;
20049 if ( abs(ddats) >= 0.5 ) {
20050
20051 /* Yes. Get TAI for the start of the UTC day that */
20052 /* ends in a leap. */
20053 JulianDate jd = jauCal2jd(dt.iy, dt.im, dt.id );
20054 d1 = jd.djm0; d2 = jd.djm1;
20055 as1 = d1;
20056 as2 = d2 - 1.0 + datd;
20057
20058 /* Is the TAI after this point? */
20059 da = a1 - as1;
20060 da = da + ( a2 - as2 );
20061 if ( da > 0 ) {
20062
20063 /* Yes: fraction of the current UTC day that has elapsed. */
20064 fd = da * DAYSEC / ( DAYSEC + ddats );
20065
20066 /* Ramp TAI-UTC to bring about SOFA's JD(UTC) convention. */
20067 datd += ddats * ( fd <= 1.0 ? fd : 1.0 ) / DAYSEC;
20068 }
20069
20070 /* Done. */
20071 break;
20072 }
20073 dats1 = dats2;
20074 }
20075
20076 /* Subtract the (possibly adjusted) TAI-UTC from TAI to give UTC. */
20077 a2 -= datd;
20078
20079 /* Return the UTC result, preserving the TAI order. */
20080 if ( big1 ) {
20081 utc1 = a1;
20082 utc2 = a2;
20083 } else {
20084 utc1 = a2;
20085 utc2 = a1;
20086 }
20087
20088 /* TODO Status */
20089 return new JulianDate(utc1, utc2);
20090
20091 };
20092
20093 /**
20094 *
20095 * Time scale transformation: Barycentric Coordinate Time, TCB, to
20096 * Barycentric Dynamical Time, TDB.
20097 *
20098 * <p>This function is derived from the International Astronomical Union's
20099 * SOFA (Standards of Fundamental Astronomy) software collection.
20100 *
20101 *<p>Status: canonical.
20102 *
20103 *<!-- Given: -->
20104 * @param tcb1 double TCB as a 2-part Julian Date
20105 * @param tcb2 double TCB as a 2-part Julian Date
20106 *
20107 *<!-- Returned:-->
20108 * @return TDB as a 2-part Julian Date
20109 *
20110 *
20111 *<p>Notes:
20112 * <ol>
20113 * <li> tcb1+tcb2 is Julian Date, apportioned in any convenient way
20114 * between the two arguments, for example where tcb1 is the Julian
20115 * Day Number and tcb2 is the fraction of a day. The returned
20116 * tdb1,tdb2 follow suit.
20117 *
20118 * <li> The 2006 IAU General Assembly introduced a conventional linear
20119 * transformation between TDB and TCB. This transformation
20120 * compensates for the drift between TCB and terrestrial time TT,
20121 * and keeps TDB approximately centered on TT. Because the
20122 * relationship between TT and TCB depends on the adopted solar
20123 * system ephemeris, the degree of alignment between TDB and TT over
20124 * long intervals will vary according to which ephemeris is used.
20125 * Former definitions of TDB attempted to avoid this problem by
20126 * stipulating that TDB and TT should differ only by periodic
20127 * effects. This is a good description of the nature of the
20128 * relationship but eluded precise mathematical formulation. The
20129 * conventional linear relationship adopted in 2006 sidestepped
20130 * these difficulties whilst delivering a TDB that in practice was
20131 * consistent with values before that date.
20132 *
20133 * <li> TDB is essentially the same as Teph, the time argument for the
20134 * JPL solar system ephemerides.
20135 * </ol>
20136 * Reference:
20137 *
20138 * IAU 2006 Resolution B3
20139 *
20140 *@version 2010 May 16
20141 *
20142 *@since SOFA release 2010-12-01
20143 *
20144 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
20145 */
20146 public static JulianDate jauTcbtdb(double tcb1, double tcb2)
20147 {
20148 double tdb1, tdb2;
20149 /* 1977 Jan 1 00:00:32.184 TT, as two-part JD */
20150 final double t77td = DJM0 + DJM77;
20151 final double t77tf = TTMTAI/DAYSEC;
20152
20153 /* TDB (days) at TAI 1977 Jan 1.0 */
20154 final double tdb0 = TDB0/86400.0;
20155
20156 double d;
20157
20158
20159 /* Result, safeguarding precision. */
20160 if ( tcb1 > tcb2 ) {
20161 d = tcb1 - t77td;
20162 tdb1 = tcb1;
20163 tdb2 = tcb2 + tdb0 - ( d + ( tcb2 - t77tf ) ) * ELB;
20164 } else {
20165 d = tcb2 - t77td;
20166 tdb1 = tcb1 + tdb0 - ( d + ( tcb1 - t77tf ) ) * ELB;
20167 tdb2 = tcb2;
20168 }
20169
20170
20171 return new JulianDate(tdb1, tdb2);
20172
20173 };
20174
20175 /**
20176 * Time scale transformation: Geocentric Coordinate Time, TCG, to
20177 * Terrestrial Time, TT.
20178 *
20179 * <p>This function is derived from the International Astronomical Union's
20180 * SOFA (Standards of Fundamental Astronomy) software collection.
20181 *
20182 *<p>Status: canonical.
20183 *
20184 *<!-- Given: -->
20185 * @param tcg1 double TCG as a 2-part Julian Date
20186 * @param tcg2 double TCG as a 2-part Julian Date
20187 *
20188 *<!-- Returned:-->
20189 * @return TT as a 2-part Julian Date
20190 *
20191 *
20192 * Note:
20193 *
20194 * tcg1+tcg2 is Julian Date, apportioned in any convenient way
20195 * between the two arguments, for example where tcg1 is the Julian
20196 * Day Number and tcg22 is the fraction of a day. The returned
20197 * tt1,tt2 follow suit.
20198 *
20199 *<p>References:
20200 *
20201 * McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),.
20202 * IERS Technical Note No. 32, BKG (2004)
20203 *
20204 * IAU 2000 Resolution B1.9
20205 *
20206 *@version 2010 May 14
20207 *
20208 *@since SOFA release 2010-12-01
20209 *
20210 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
20211 */
20212 public static JulianDate jauTcgtt(double tcg1, double tcg2)
20213 {
20214 double tt1,tt2;
20215 /* 1977 Jan 1 00:00:32.184 TT, as MJD */
20216 final double t77t = DJM77 + TTMTAI/DAYSEC;
20217
20218
20219 /* Result, safeguarding precision. */
20220 if ( tcg1 > tcg2 ) {
20221 tt1 = tcg1;
20222 tt2 = tcg2 - ( ( tcg1 - DJM0 ) + ( tcg2 - t77t ) ) * ELG;
20223 } else {
20224 tt1 = tcg1 - ( ( tcg2 - DJM0 ) + ( tcg1 - t77t ) ) * ELG;
20225 tt2 = tcg2;
20226 }
20227
20228 return new JulianDate(tt1, tt2);
20229 };
20230
20231
20232 /**
20233 *
20234 * Time scale transformation: Barycentric Dynamical Time, TDB, to
20235 * Barycentric Coordinate Time, TCB.
20236 *
20237 * <p>This function is derived from the International Astronomical Union's
20238 * SOFA (Standards of Fundamental Astronomy) software collection.
20239 *
20240 *<p>Status: canonical.
20241 *
20242 *<!-- Given: -->
20243 * @param tdb1 TDB as a 2-part Julian Date
20244 * @param tdb2 TDB as a 2-part Julian Date
20245 *
20246 *<!-- Returned:-->
20247 * @return TCB as a 2-part Julian Date
20248 *
20249 *<p>Notes:
20250 * <ol>
20251 * <li> tdb1+tdb2 is Julian Date, apportioned in any convenient way
20252 * between the two arguments, for example where tdb1 is the Julian
20253 * Day Number and tdb2 is the fraction of a day. The returned
20254 * tcb1,tcb2 follow suit.
20255 *
20256 * <li> The 2006 IAU General Assembly introduced a conventional linear
20257 * transformation between TDB and TCB. This transformation
20258 * compensates for the drift between TCB and terrestrial time TT,
20259 * and keeps TDB approximately centered on TT. Because the
20260 * relationship between TT and TCB depends on the adopted solar
20261 * system ephemeris, the degree of alignment between TDB and TT over
20262 * long intervals will vary according to which ephemeris is used.
20263 * Former definitions of TDB attempted to avoid this problem by
20264 * stipulating that TDB and TT should differ only by periodic
20265 * effects. This is a good description of the nature of the
20266 * relationship but eluded precise mathematical formulation. The
20267 * conventional linear relationship adopted in 2006 sidestepped
20268 * these difficulties whilst delivering a TDB that in practice was
20269 * consistent with values before that date.
20270 *
20271 * <li> TDB is essentially the same as Teph, the time argument for the
20272 * JPL solar system ephemerides.
20273 * </ol>
20274 * Reference:
20275 *
20276 * IAU 2006 Resolution B3
20277 *
20278 *@version 2010 September 10
20279 *
20280 *@since SOFA release 2010-12-01
20281 *
20282 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
20283 */
20284 public static JulianDate jauTdbtcb(double tdb1, double tdb2 )
20285 {
20286 double tcb1, tcb2;
20287 /* 1977 Jan 1 00:00:32.184 TT, as two-part JD */
20288 final double t77td = DJM0 + DJM77;
20289 final double t77tf = TTMTAI/DAYSEC;
20290
20291 /* TDB (days) at TAI 1977 Jan 1.0 */
20292 final double tdb0 = TDB0/DAYSEC;
20293
20294 /* TDB to TCB rate */
20295 final double elbb = ELB/(1.0-ELB);
20296
20297 double d, f;
20298
20299
20300 /* Result, preserving date format but safeguarding precision. */
20301 if ( tdb1 > tdb2 ) {
20302 d = t77td - tdb1;
20303 f = tdb2 - tdb0;
20304 tcb1 = tdb1;
20305 tcb2 = f - ( d - ( f - t77tf ) ) * elbb;
20306 } else {
20307 d = t77td - tdb2;
20308 f = tdb1 - tdb0;
20309 tcb1 = f + ( d - ( f - t77tf ) ) * elbb;
20310 tcb2 = tdb2;
20311 }
20312
20313 return new JulianDate(tcb1, tcb2);
20314
20315 };
20316
20317
20318 /**
20319 *
20320 * Time scale transformation: Barycentric Dynamical Time, TDB, to
20321 * Terrestrial Time, TT.
20322 *
20323 * <p>This function is derived from the International Astronomical Union's
20324 * SOFA (Standards of Fundamental Astronomy) software collection.
20325 *
20326 *<p>Status: canonical.
20327 *
20328 *<!-- Given: -->
20329 * @param tdb1 double TDB as a 2-part Julian Date
20330 * @param tdb2 double TDB as a 2-part Julian Date
20331 * @param dtr double TDB-TT in seconds
20332 *
20333 *<!-- Returned:-->
20334 * @return TT as a 2-part Julian Date
20335 *
20336 *
20337 *<p>Notes:
20338 * <ol>
20339 * <li> tdb1+tdb2 is Julian Date, apportioned in any convenient way
20340 * between the two arguments, for example where tdb1 is the Julian
20341 * Day Number and tdb2 is the fraction of a day. The returned
20342 * tt1,tt2 follow suit.
20343 *
20344 * <li> The argument dtr represents the quasi-periodic component of the
20345 * GR transformation between TT and TCB. It is dependent upon the
20346 * adopted solar-system ephemeris, and can be obtained by numerical
20347 * integration, by interrogating a precomputed time ephemeris or by
20348 * evaluating a model such as that implemented in the SOFA function
20349 * jauDtdb. The quantity is dominated by an annual term of 1.7 ms
20350 * amplitude.
20351 *
20352 * <li> TDB is essentially the same as Teph, the time argument for the
20353 * JPL solar system ephemerides.
20354 * </ol>
20355 *<p>References:
20356 *
20357 * McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
20358 * IERS Technical Note No. 32, BKG (2004)
20359 *
20360 * IAU 2006 Resolution 3
20361 *
20362 *@version 2010 May 13
20363 *
20364 *@since SOFA release 2010-12-01
20365 *
20366 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
20367 *
20368 */
20369 public static JulianDate jauTdbtt(double tdb1, double tdb2, double dtr )
20370 {
20371 double tt1, tt2;
20372 double dtrd;
20373
20374
20375 /* Result, safeguarding precision. */
20376 dtrd = dtr / DAYSEC;
20377 if ( tdb1 > tdb2 ) {
20378 tt1 = tdb1;
20379 tt2 = tdb2 - dtrd;
20380 } else {
20381 tt1 = tdb1 - dtrd;
20382 tt2 = tdb2;
20383 }
20384
20385 return new JulianDate(tt1, tt2);
20386
20387 }
20388
20389 /**
20390 *
20391 * Convert hours, minutes, seconds to radians.
20392 *
20393 * <p>This function is derived from the International Astronomical Union's
20394 * SOFA (Standards of Fundamental Astronomy) software collection.
20395 *
20396 *<p>Status: support function.
20397 *
20398 *<!-- Given: -->
20399 * @param s char sign: '-' = negative, otherwise positive
20400 * @param ihour int hours
20401 * @param imin int minutes
20402 * @param sec double seconds
20403 *
20404 *<!-- Returned:-->
20405 * @return double angle in radians
20406 *@throws JSOFAIllegalParameter illegal parameter of some form
20407 * Returned (function value):
20408 * int status: 0 = OK
20409 * 1 = ihour outside range 0-23
20410 * 2 = imin outside range 0-59
20411 * 3 = sec outside range 0-59.999...
20412 *
20413 *<p>Notes:
20414 *<ul>
20415 * <li> The result is computed even if any of the range checks fail.
20416 *
20417 * <li> Negative ihour, imin and/or sec produce a warning status, but
20418 * the absolute value is used in the conversion.
20419 *</ul>
20420 *@version 2010 August 27
20421 *
20422 *@since SOFA release 2010-12-01
20423 *
20424 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
20425 *
20426 */
20427 public static double jauTf2a(char s, int ihour, int imin, double sec ) throws JSOFAIllegalParameter
20428 {
20429 double rad;
20430
20431 /* Compute the interval. */
20432 rad = ( s == '-' ? -1.0 : 1.0 ) *
20433 ( 60.0 * ( 60.0 * ( (double) abs(ihour) ) +
20434 ( (double) abs(imin) ) ) +
20435 abs(sec) ) * DS2R;
20436
20437 /* Validate arguments and return status. */
20438 if ( ihour < 0 || ihour > 23 ) throw new JSOFAIllegalParameter("bad hour", 1);
20439 if ( imin < 0 || imin > 59 ) throw new JSOFAIllegalParameter("bad minute", 2);
20440 if ( sec < 0.0 || sec >= 60.0 )throw new JSOFAIllegalParameter("bad second", 3);
20441 return rad;
20442
20443 };
20444
20445 /**
20446 *
20447 * Convert hours, minutes, seconds to days.
20448 *
20449 * <p>This function is derived from the International Astronomical Union's
20450 * SOFA (Standards of Fundamental Astronomy) software collection.
20451 *
20452 *<p>Status: support function.
20453 *
20454 *<!-- Given: -->
20455 * @param s char sign: '-' = negative, otherwise positive
20456 * @param ihour int hours
20457 * @param imin int minutes
20458 * @param sec double seconds
20459 *
20460 *<!-- Returned:-->
20461 * days double interval in days
20462 *
20463 * Returned (function value):
20464 * int status: 0 = OK
20465 * 1 = ihour outside range 0-23
20466 * 2 = imin outside range 0-59
20467 * 3 = sec outside range 0-59.999...
20468 *
20469 *<p>Notes:
20470 *<ol>
20471 * <li> The result is computed even if any of the range checks fail.
20472 *
20473 * <li> Negative ihour, imin and/or sec produce a warning status, but
20474 * the absolute value is used in the conversion.
20475 *</ol>
20476 *@version 2010 August 27
20477 *
20478 *@since SOFA release 2010-12-01
20479 *
20480 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
20481 * @throws JSOFAIllegalParameter
20482 */
20483 public static double jauTf2d(char s, int ihour, int imin, double sec) throws JSOFAIllegalParameter
20484 {
20485 double days;
20486 /* Compute the interval. */
20487 days = ( s == '-' ? -1.0 : 1.0 ) *
20488 ( 60.0 * ( 60.0 * ( (double) abs(ihour) ) +
20489 ( (double) abs(imin) ) ) +
20490 abs(sec) ) / DAYSEC;
20491
20492 /* FIXME Validate arguments and return status. */
20493 if ( ihour < 0 || ihour > 23 ) throw new JSOFAIllegalParameter("bad hour", 1);
20494 if ( imin < 0 || imin > 59 ) throw new JSOFAIllegalParameter("bad minute", 2);
20495 if ( sec < 0.0 || sec >= 60.0 ) throw new JSOFAIllegalParameter("bad second", 3);
20496 return days;
20497
20498 }
20499
20500 /**
20501 * Transpose an r-matrix.
20502 *
20503 *<p>This function is derived from the International Astronomical Union's
20504 * SOFA (Standards Of Fundamental Astronomy) software collection.
20505 *
20506 *<p>Status: vector/matrix support function.
20507 *
20508 *<!-- Given: -->
20509 * @param r double[3][3] r-matrix
20510 *
20511 *<!-- Returned: -->
20512 * @return rt double[3][3] <u>returned</u> transpose
20513 *
20514 * Note:
20515 * It is permissible for r and rt to be the same array.
20516 *
20517 *<p>Called:<ul>
20518 * <li>{@link #jauCr} copy r-matrix
20519 * </ul>
20520 *@version 2008 May 22
20521 *
20522 * @since Release 20101201
20523 *
20524 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
20525 */
20526 public static double[][] jauTr(double r[][])
20527 {
20528 double wm[][]= new double[3][3];
20529 int i, j;
20530
20531
20532 for (i = 0; i < 3; i++) {
20533 for (j = 0; j < 3; j++) {
20534 wm[i][j] = r[j][i];
20535 }
20536 }
20537
20538
20539 return wm;
20540
20541 }
20542
20543
20544 /**
20545 * Multiply a p-vector by the transpose of an r-matrix.
20546 *
20547 *<p>This function is derived from the International Astronomical Union's
20548 * SOFA (Standards Of Fundamental Astronomy) software collection.
20549 *
20550 *<p>Status: vector/matrix support function.
20551 *
20552 *<!-- Given: -->
20553 * @param r double[3][3] r-matrix
20554 * @param p double[3] p-vector
20555 *
20556 *<!-- Returned: -->
20557 * @return trp double[3] <u>returned</u> r * p
20558 *
20559 * Note:
20560 * It is permissible for p and trp to be the same array.
20561 *
20562 *<p>Called:<ul>
20563 * <li>{@link #jauTr} transpose r-matrix
20564 * <li>{@link #jauRxp} product of r-matrix and p-vector
20565 * </ul>
20566 *@version 2008 October 28
20567 *
20568 * @since Release 20101201
20569 *
20570 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
20571 */
20572 public static double[] jauTrxp(double r[][], double p[] )
20573 {
20574 double tr[][];
20575 double trp[];
20576
20577 /* Transpose of matrix r. */
20578 tr = jauTr(r);
20579
20580 /* Matrix tr * vector p -> vector trp. */
20581 trp = jauRxp(tr, p);
20582
20583 return trp;
20584
20585 }
20586
20587
20588 /**
20589 * Multiply a pv-vector by the transpose of an r-matrix.
20590 *
20591 *<p>This function is derived from the International Astronomical Union's
20592 * SOFA (Standards Of Fundamental Astronomy) software collection.
20593 *
20594 *<p>Status: vector/matrix support function.
20595 *
20596 *<!-- Given: -->
20597 * @param r double[3][3] r-matrix
20598 * @param pv double[2][3] pv-vector
20599 *
20600 *<!-- Returned: -->
20601 * @return trpv double[2][3] <u>returned</u> r * pv
20602 *
20603 * Note:
20604 * It is permissible for pv and trpv to be the same array.
20605 *
20606 *<p>Called:<ul>
20607 * <li>{@link #jauTr} transpose r-matrix
20608 * <li>{@link #jauRxpv} product of r-matrix and pv-vector
20609 * </ul>
20610 *@version 2008 October 28
20611 *
20612 * @since Release 20101201
20613 *
20614 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
20615 */
20616 public static double[][] jauTrxpv(double r[][], double pv[][] )
20617 {
20618 double tr[][], trpv[][];
20619
20620
20621 /* Transpose of matrix r. */
20622 tr = jauTr(r);
20623
20624 /* Matrix tr * vector pv -> vector trpv. */
20625 trpv = jauRxpv(tr, pv);
20626
20627 return trpv;
20628
20629 }
20630
20631 /*
20632 * constant arrays set outside jauXy06 to avoid problems with 65535 byte limit on function size
20633 */
20634 static {
20635 /* need to define this function because it appears that javac lumps all of the statically defined initalizers into one function on
20636 * compilation - so this will force a second function */
20637 init_mfals();
20638 }
20639 /** Fundamental-argument multipliers: luni-solar terms */
20640 private static int mfals[][]; //IMPL would like to be final really
20641
20642 private static void init_mfals(){
20643
20644 mfals = new int[][]
20645 {
20646
20647 /* 1-10 */
20648 { 0, 0, 0, 0, 1 },
20649 { 0, 0, 2, -2, 2 },
20650 { 0, 0, 2, 0, 2 },
20651 { 0, 0, 0, 0, 2 },
20652 { 0, 1, 0, 0, 0 },
20653 { 0, 1, 2, -2, 2 },
20654 { 1, 0, 0, 0, 0 },
20655 { 0, 0, 2, 0, 1 },
20656 { 1, 0, 2, 0, 2 },
20657 { 0, 1, -2, 2, -2 },
20658
20659 /* 11-20 */
20660 { 0, 0, 2, -2, 1 },
20661 { 1, 0, -2, 0, -2 },
20662 { 1, 0, 0, -2, 0 },
20663 { 1, 0, 0, 0, 1 },
20664 { 1, 0, 0, 0, -1 },
20665 { 1, 0, -2, -2, -2 },
20666 { 1, 0, 2, 0, 1 },
20667 { 2, 0, -2, 0, -1 },
20668 { 0, 0, 0, 2, 0 },
20669 { 0, 0, 2, 2, 2 },
20670
20671 /* 21-30 */
20672 { 2, 0, 0, -2, 0 },
20673 { 0, 2, -2, 2, -2 },
20674 { 2, 0, 2, 0, 2 },
20675 { 1, 0, 2, -2, 2 },
20676 { 1, 0, -2, 0, -1 },
20677 { 2, 0, 0, 0, 0 },
20678 { 0, 0, 2, 0, 0 },
20679 { 0, 1, 0, 0, 1 },
20680 { 1, 0, 0, -2, -1 },
20681 { 0, 2, 2, -2, 2 },
20682
20683 /* 31-40 */
20684 { 0, 0, 2, -2, 0 },
20685 { 1, 0, 0, -2, 1 },
20686 { 0, 1, 0, 0, -1 },
20687 { 0, 2, 0, 0, 0 },
20688 { 1, 0, -2, -2, -1 },
20689 { 1, 0, 2, 2, 2 },
20690 { 0, 1, 2, 0, 2 },
20691 { 2, 0, -2, 0, 0 },
20692 { 0, 0, 2, 2, 1 },
20693 { 0, 1, -2, 0, -2 },
20694
20695 /* 41-50 */
20696 { 0, 0, 0, 2, 1 },
20697 { 1, 0, 2, -2, 1 },
20698 { 2, 0, 0, -2, -1 },
20699 { 2, 0, 2, -2, 2 },
20700 { 2, 0, 2, 0, 1 },
20701 { 0, 0, 0, 2, -1 },
20702 { 0, 1, -2, 2, -1 },
20703 { 1, 1, 0, -2, 0 },
20704 { 2, 0, 0, -2, 1 },
20705 { 1, 0, 0, 2, 0 },
20706
20707 /* 51-60 */
20708 { 0, 1, 2, -2, 1 },
20709 { 1, -1, 0, 0, 0 },
20710 { 0, 1, -1, 1, -1 },
20711 { 2, 0, -2, 0, -2 },
20712 { 0, 1, 0, -2, 0 },
20713 { 1, 0, 0, -1, 0 },
20714 { 3, 0, 2, 0, 2 },
20715 { 0, 0, 0, 1, 0 },
20716 { 1, -1, 2, 0, 2 },
20717 { 1, 1, -2, -2, -2 },
20718
20719 /* 61-70 */
20720 { 1, 0, -2, 0, 0 },
20721 { 2, 0, 0, 0, -1 },
20722 { 0, 1, -2, -2, -2 },
20723 { 1, 1, 2, 0, 2 },
20724 { 2, 0, 0, 0, 1 },
20725 { 1, 1, 0, 0, 0 },
20726 { 1, 0, -2, 2, -1 },
20727 { 1, 0, 2, 0, 0 },
20728 { 1, -1, 0, -1, 0 },
20729 { 1, 0, 0, 0, 2 },
20730
20731 /* 71-80 */
20732 { 1, 0, -1, 0, -1 },
20733 { 0, 0, 2, 1, 2 },
20734 { 1, 0, -2, -4, -2 },
20735 { 1, -1, 0, -1, -1 },
20736 { 1, 0, 2, 2, 1 },
20737 { 0, 2, -2, 2, -1 },
20738 { 1, 0, 0, 0, -2 },
20739 { 2, 0, -2, -2, -2 },
20740 { 1, 1, 2, -2, 2 },
20741 { 2, 0, -2, -4, -2 },
20742
20743 /* 81-90 */
20744 { 1, 0, -4, 0, -2 },
20745 { 2, 0, 2, -2, 1 },
20746 { 1, 0, 0, -1, -1 },
20747 { 2, 0, 2, 2, 2 },
20748 { 3, 0, 0, 0, 0 },
20749 { 1, 0, 0, 2, 1 },
20750 { 0, 0, 2, -2, -1 },
20751 { 3, 0, 2, -2, 2 },
20752 { 0, 0, 4, -2, 2 },
20753 { 1, 0, 0, -4, 0 },
20754
20755 /* 91-100 */
20756 { 0, 1, 2, 0, 1 },
20757 { 2, 0, 0, -4, 0 },
20758 { 1, 1, 0, -2, -1 },
20759 { 2, 0, -2, 0, 1 },
20760 { 0, 0, 2, 0, -1 },
20761 { 0, 1, -2, 0, -1 },
20762 { 0, 1, 0, 0, 2 },
20763 { 0, 0, 2, -1, 2 },
20764 { 0, 0, 2, 4, 2 },
20765 { 2, 1, 0, -2, 0 },
20766
20767 /* 101-110 */
20768 { 1, 1, 0, -2, 1 },
20769 { 1, -1, 0, -2, 0 },
20770 { 1, -1, 0, -1, -2 },
20771 { 1, -1, 0, 0, 1 },
20772 { 0, 1, -2, 2, 0 },
20773 { 0, 1, 0, 0, -2 },
20774 { 1, -1, 2, 2, 2 },
20775 { 1, 0, 0, 2, -1 },
20776 { 1, -1, -2, -2, -2 },
20777 { 3, 0, 2, 0, 1 },
20778
20779 /* 111-120 */
20780 { 0, 1, 2, 2, 2 },
20781 { 1, 0, 2, -2, 0 },
20782 { 1, 1, -2, -2, -1 },
20783 { 1, 0, 2, -4, 1 },
20784 { 0, 1, -2, -2, -1 },
20785 { 2, -1, 2, 0, 2 },
20786 { 0, 0, 0, 2, 2 },
20787 { 1, -1, 2, 0, 1 },
20788 { 1, -1, -2, 0, -2 },
20789 { 0, 1, 0, 2, 0 },
20790
20791 /* 121-130 */
20792 { 0, 1, 2, -2, 0 },
20793 { 0, 0, 0, 1, 1 },
20794 { 1, 0, -2, -2, 0 },
20795 { 0, 3, 2, -2, 2 },
20796 { 2, 1, 2, 0, 2 },
20797 { 1, 1, 0, 0, 1 },
20798 { 2, 0, 0, 2, 0 },
20799 { 1, 1, 2, 0, 1 },
20800 { 1, 0, 0, -2, -2 },
20801 { 1, 0, -2, 2, 0 },
20802
20803 /* 131-140 */
20804 { 1, 0, -1, 0, -2 },
20805 { 0, 1, 0, -2, 1 },
20806 { 0, 1, 0, 1, 0 },
20807 { 0, 0, 0, 1, -1 },
20808 { 1, 0, -2, 2, -2 },
20809 { 1, -1, 0, 0, -1 },
20810 { 0, 0, 0, 4, 0 },
20811 { 1, -1, 0, 2, 0 },
20812 { 1, 0, 2, 1, 2 },
20813 { 1, 0, 2, -1, 2 },
20814
20815 /* 141-150 */
20816 { 0, 0, 2, 1, 1 },
20817 { 1, 0, 0, -2, 2 },
20818 { 1, 0, -2, 0, 1 },
20819 { 1, 0, -2, -4, -1 },
20820 { 0, 0, 2, 2, 0 },
20821 { 1, 1, 2, -2, 1 },
20822 { 1, 0, -2, 1, -1 },
20823 { 0, 0, 1, 0, 1 },
20824 { 2, 0, -2, -2, -1 },
20825 { 4, 0, 2, 0, 2 },
20826
20827 /* 151-160 */
20828 { 2, -1, 0, 0, 0 },
20829 { 2, 1, 2, -2, 2 },
20830 { 0, 1, 2, 1, 2 },
20831 { 1, 0, 4, -2, 2 },
20832 { 1, 1, 0, 0, -1 },
20833 { 2, 0, 2, 0, 0 },
20834 { 2, 0, -2, -4, -1 },
20835 { 1, 0, -1, 0, 0 },
20836 { 1, 0, 0, 1, 0 },
20837 { 0, 1, 0, 2, 1 },
20838
20839 /* 161-170 */
20840 { 1, 0, -4, 0, -1 },
20841 { 1, 0, 0, -4, -1 },
20842 { 2, 0, 2, 2, 1 },
20843 { 2, 1, 0, 0, 0 },
20844 { 0, 0, 2, -3, 2 },
20845 { 1, 2, 0, -2, 0 },
20846 { 0, 3, 0, 0, 0 },
20847 { 0, 0, 4, 0, 2 },
20848 { 0, 0, 2, -4, 1 },
20849 { 2, 0, 0, -2, -2 },
20850
20851 /* 171-180 */
20852 { 1, 1, -2, -4, -2 },
20853 { 0, 1, 0, -2, -1 },
20854 { 0, 0, 0, 4, 1 },
20855 { 3, 0, 2, -2, 1 },
20856 { 1, 0, 2, 4, 2 },
20857 { 1, 1, -2, 0, -2 },
20858 { 0, 0, 4, -2, 1 },
20859 { 2, -2, 0, -2, 0 },
20860 { 2, 1, 0, -2, -1 },
20861 { 0, 2, 0, -2, 0 },
20862
20863 /* 181-190 */
20864 { 1, 0, 0, -1, 1 },
20865 { 1, 1, 2, 2, 2 },
20866 { 3, 0, 0, 0, -1 },
20867 { 2, 0, 0, -4, -1 },
20868 { 3, 0, 2, 2, 2 },
20869 { 0, 0, 2, 4, 1 },
20870 { 0, 2, -2, -2, -2 },
20871 { 1, -1, 0, -2, -1 },
20872 { 0, 0, 2, -1, 1 },
20873 { 2, 0, 0, 2, 1 },
20874
20875 /* 191-200 */
20876 { 1, -1, -2, 2, -1 },
20877 { 0, 0, 0, 2, -2 },
20878 { 2, 0, 0, -4, 1 },
20879 { 1, 0, 0, -4, 1 },
20880 { 2, 0, 2, -4, 1 },
20881 { 4, 0, 2, -2, 2 },
20882 { 2, 1, -2, 0, -1 },
20883 { 2, 1, -2, -4, -2 },
20884 { 3, 0, 0, -4, 0 },
20885 { 1, -1, 2, 2, 1 },
20886
20887 /* 201-210 */
20888 { 1, -1, -2, 0, -1 },
20889 { 0, 2, 0, 0, 1 },
20890 { 1, 2, -2, -2, -2 },
20891 { 1, 1, 0, -4, 0 },
20892 { 2, 0, 0, -2, 2 },
20893 { 0, 2, 2, -2, 1 },
20894 { 1, 0, 2, 0, -1 },
20895 { 2, 1, 0, -2, 1 },
20896 { 2, -1, -2, 0, -1 },
20897 { 1, -1, -2, -2, -1 },
20898
20899 /* 211-220 */
20900 { 0, 1, -2, 1, -2 },
20901 { 1, 0, -4, 2, -2 },
20902 { 0, 1, 2, 2, 1 },
20903 { 3, 0, 0, 0, 1 },
20904 { 2, -1, 2, 2, 2 },
20905 { 0, 1, -2, -4, -2 },
20906 { 1, 0, -2, -3, -2 },
20907 { 2, 0, 0, 0, 2 },
20908 { 1, -1, 0, -2, -2 },
20909 { 2, 0, -2, 2, -1 },
20910
20911 /* 221-230 */
20912 { 0, 2, -2, 0, -2 },
20913 { 3, 0, -2, 0, -1 },
20914 { 2, -1, 2, 0, 1 },
20915 { 1, 0, -2, -1, -2 },
20916 { 0, 0, 2, 0, 3 },
20917 { 2, 0, -4, 0, -2 },
20918 { 2, 1, 0, -4, 0 },
20919 { 1, 1, -2, 1, -1 },
20920 { 0, 2, 2, 0, 2 },
20921 { 1, -1, 2, -2, 2 },
20922
20923 /* 231-240 */
20924 { 1, -1, 0, -2, 1 },
20925 { 2, 1, 2, 0, 1 },
20926 { 1, 0, 2, -4, 2 },
20927 { 1, 1, -2, 0, -1 },
20928 { 1, 1, 0, 2, 0 },
20929 { 1, 0, 0, -3, 0 },
20930 { 2, 0, 2, -1, 2 },
20931 { 0, 2, 0, 0, -1 },
20932 { 2, -1, 0, -2, 0 },
20933 { 4, 0, 0, 0, 0 },
20934
20935 /* 241-250 */
20936 { 2, 1, -2, -2, -2 },
20937 { 0, 2, -2, 2, 0 },
20938 { 1, 0, 2, 1, 1 },
20939 { 1, 0, -1, 0, -3 },
20940 { 3, -1, 2, 0, 2 },
20941 { 2, 0, 2, -2, 0 },
20942 { 1, -2, 0, 0, 0 },
20943 { 2, 0, 0, 0, -2 },
20944 { 1, 0, 0, 4, 0 },
20945 { 0, 1, 0, 1, 1 },
20946
20947 /* 251-260 */
20948 { 1, 0, 2, 2, 0 },
20949 { 0, 1, 0, 2, -1 },
20950 { 0, 1, 0, 1, -1 },
20951 { 0, 0, 2, -2, 3 },
20952 { 3, 1, 2, 0, 2 },
20953 { 1, 1, 2, 1, 2 },
20954 { 1, 1, -2, 2, -1 },
20955 { 2, -1, 2, -2, 2 },
20956 { 1, -2, 2, 0, 2 },
20957 { 1, 0, 2, -4, 0 },
20958
20959 /* 261-270 */
20960 { 0, 0, 1, 0, 0 },
20961 { 1, 0, 2, -3, 1 },
20962 { 1, -2, 0, -2, 0 },
20963 { 2, 0, 0, 2, -1 },
20964 { 1, 1, 2, -4, 1 },
20965 { 4, 0, 2, 0, 1 },
20966 { 0, 1, 2, 1, 1 },
20967 { 1, 2, 2, -2, 2 },
20968 { 2, 0, 2, 1, 2 },
20969 { 2, 1, 2, -2, 1 },
20970
20971 /* 271-280 */
20972 { 1, 0, 2, -1, 1 },
20973 { 1, 0, 4, -2, 1 },
20974 { 1, -1, 2, -2, 1 },
20975 { 0, 1, 0, -4, 0 },
20976 { 3, 0, -2, -2, -2 },
20977 { 0, 0, 4, -4, 2 },
20978 { 2, 0, -4, -2, -2 },
20979 { 2, -2, 0, -2, -1 },
20980 { 1, 0, 2, -2, -1 },
20981 { 2, 0, -2, -6, -2 },
20982
20983 /* 281-290 */
20984 { 1, 0, -2, 1, -2 },
20985 { 1, 0, -2, 2, 1 },
20986 { 1, -1, 0, 2, -1 },
20987 { 1, 0, -2, 1, 0 },
20988 { 2, -1, 0, -2, 1 },
20989 { 1, -1, 0, 2, 1 },
20990 { 2, 0, -2, -2, 0 },
20991 { 1, 0, 2, -3, 2 },
20992 { 0, 0, 0, 4, -1 },
20993 { 2, -1, 0, 0, 1 },
20994
20995 /* 291-300 */
20996 { 2, 0, 4, -2, 2 },
20997 { 0, 0, 2, 3, 2 },
20998 { 0, 1, 4, -2, 2 },
20999 { 0, 1, -2, 2, 1 },
21000 { 1, 1, 0, 2, 1 },
21001 { 1, 0, 0, 4, 1 },
21002 { 0, 0, 4, 0, 1 },
21003 { 2, 0, 0, -3, 0 },
21004 { 1, 0, 0, -1, -2 },
21005 { 1, -2, -2, -2, -2 },
21006
21007 /* 301-310 */
21008 { 3, 0, 0, 2, 0 },
21009 { 2, 0, 2, -4, 2 },
21010 { 1, 1, -2, -4, -1 },
21011 { 1, 0, -2, -6, -2 },
21012 { 2, -1, 0, 0, -1 },
21013 { 2, -1, 0, 2, 0 },
21014 { 0, 1, 2, -2, -1 },
21015 { 1, 1, 0, 1, 0 },
21016 { 1, 2, 0, -2, -1 },
21017 { 1, 0, 0, 1, -1 },
21018
21019 /* 311-320 */
21020 { 0, 0, 1, 0, 2 },
21021 { 3, 1, 2, -2, 2 },
21022 { 1, 0, -4, -2, -2 },
21023 { 1, 0, 2, 4, 1 },
21024 { 1, -2, 2, 2, 2 },
21025 { 1, -1, -2, -4, -2 },
21026 { 0, 0, 2, -4, 2 },
21027 { 0, 0, 2, -3, 1 },
21028 { 2, 1, -2, 0, 0 },
21029 { 3, 0, -2, -2, -1 },
21030
21031 /* 321-330 */
21032 { 2, 0, 2, 4, 2 },
21033 { 0, 0, 0, 0, 3 },
21034 { 2, -1, -2, -2, -2 },
21035 { 2, 0, 0, -1, 0 },
21036 { 3, 0, 2, -4, 2 },
21037 { 2, 1, 2, 2, 2 },
21038 { 0, 0, 3, 0, 3 },
21039 { 1, 1, 2, 2, 1 },
21040 { 2, 1, 0, 0, -1 },
21041 { 1, 2, 0, -2, 1 },
21042
21043 /* 331-340 */
21044 { 3, 0, 2, 2, 1 },
21045 { 1, -1, -2, 2, -2 },
21046 { 1, 1, 0, -1, 0 },
21047 { 1, 2, 0, 0, 0 },
21048 { 1, 0, 4, 0, 2 },
21049 { 1, -1, 2, 4, 2 },
21050 { 2, 1, 0, 0, 1 },
21051 { 1, 0, 0, 2, 2 },
21052 { 1, -1, -2, 2, 0 },
21053 { 0, 2, -2, -2, -1 },
21054
21055 /* 341-350 */
21056 { 2, 0, -2, 0, 2 },
21057 { 5, 0, 2, 0, 2 },
21058 { 3, 0, -2, -6, -2 },
21059 { 1, -1, 2, -1, 2 },
21060 { 3, 0, 0, -4, -1 },
21061 { 1, 0, 0, 1, 1 },
21062 { 1, 0, -4, 2, -1 },
21063 { 0, 1, 2, -4, 1 },
21064 { 1, 2, 2, 0, 2 },
21065 { 0, 1, 0, -2, -2 },
21066
21067 /* 351-360 */
21068 { 0, 0, 2, -1, 0 },
21069 { 1, 0, 1, 0, 1 },
21070 { 0, 2, 0, -2, 1 },
21071 { 3, 0, 2, 0, 0 },
21072 { 1, 1, -2, 1, 0 },
21073 { 2, 1, -2, -4, -1 },
21074 { 3, -1, 0, 0, 0 },
21075 { 2, -1, -2, 0, 0 },
21076 { 4, 0, 2, -2, 1 },
21077 { 2, 0, -2, 2, 0 },
21078
21079 /* 361-370 */
21080 { 1, 1, 2, -2, 0 },
21081 { 1, 0, -2, 4, -1 },
21082 { 1, 0, -2, -2, 1 },
21083 { 2, 0, 2, -4, 0 },
21084 { 1, 1, 0, -2, -2 },
21085 { 1, 1, -2, -2, 0 },
21086 { 1, 0, 1, -2, 1 },
21087 { 2, -1, -2, -4, -2 },
21088 { 3, 0, -2, 0, -2 },
21089 { 0, 1, -2, -2, 0 },
21090
21091 /* 371-380 */
21092 { 3, 0, 0, -2, -1 },
21093 { 1, 0, -2, -3, -1 },
21094 { 0, 1, 0, -4, -1 },
21095 { 1, -2, 2, -2, 1 },
21096 { 0, 1, -2, 1, -1 },
21097 { 1, -1, 0, 0, 2 },
21098 { 2, 0, 0, 1, 0 },
21099 { 1, -2, 0, 2, 0 },
21100 { 1, 2, -2, -2, -1 },
21101 { 0, 0, 4, -4, 1 },
21102
21103 /* 381-390 */
21104 { 0, 1, 2, 4, 2 },
21105 { 0, 1, -4, 2, -2 },
21106 { 3, 0, -2, 0, 0 },
21107 { 2, -1, 2, 2, 1 },
21108 { 0, 1, -2, -4, -1 },
21109 { 4, 0, 2, 2, 2 },
21110 { 2, 0, -2, -3, -2 },
21111 { 2, 0, 0, -6, 0 },
21112 { 1, 0, 2, 0, 3 },
21113 { 3, 1, 0, 0, 0 },
21114
21115 /* 391-400 */
21116 { 3, 0, 0, -4, 1 },
21117 { 1, -1, 2, 0, 0 },
21118 { 1, -1, 0, -4, 0 },
21119 { 2, 0, -2, 2, -2 },
21120 { 1, 1, 0, -2, 2 },
21121 { 4, 0, 0, -2, 0 },
21122 { 2, 2, 0, -2, 0 },
21123 { 0, 1, 2, 0, 0 },
21124 { 1, 1, 0, -4, 1 },
21125 { 1, 0, 0, -4, -2 },
21126
21127 /* 401-410 */
21128 { 0, 0, 0, 1, 2 },
21129 { 3, 0, 0, 2, 1 },
21130 { 1, 1, 0, -4, -1 },
21131 { 0, 0, 2, 2, -1 },
21132 { 1, 1, 2, 0, 0 },
21133 { 1, -1, 2, -4, 1 },
21134 { 1, 1, 0, 0, 2 },
21135 { 0, 0, 2, 6, 2 },
21136 { 4, 0, -2, -2, -1 },
21137 { 2, 1, 0, -4, -1 },
21138
21139 /* 411-420 */
21140 { 0, 0, 0, 3, 1 },
21141 { 1, -1, -2, 0, 0 },
21142 { 0, 0, 2, 1, 0 },
21143 { 1, 0, 0, 2, -2 },
21144 { 3, -1, 2, 2, 2 },
21145 { 3, -1, 2, -2, 2 },
21146 { 1, 0, 0, -1, 2 },
21147 { 1, -2, 2, -2, 2 },
21148 { 0, 1, 0, 2, 2 },
21149 { 0, 1, -2, -1, -2 },
21150
21151 /* 421-430 */
21152 { 1, 1, -2, 0, 0 },
21153 { 0, 2, 2, -2, 0 },
21154 { 3, -1, -2, -1, -2 },
21155 { 1, 0, 0, -6, 0 },
21156 { 1, 0, -2, -4, 0 },
21157 { 2, 1, 0, -4, 1 },
21158 { 2, 0, 2, 0, -1 },
21159 { 2, 0, -4, 0, -1 },
21160 { 0, 0, 3, 0, 2 },
21161 { 2, 1, -2, -2, -1 },
21162
21163 /* 431-440 */
21164 { 1, -2, 0, 0, 1 },
21165 { 2, -1, 0, -4, 0 },
21166 { 0, 0, 0, 3, 0 },
21167 { 5, 0, 2, -2, 2 },
21168 { 1, 2, -2, -4, -2 },
21169 { 1, 0, 4, -4, 2 },
21170 { 0, 0, 4, -1, 2 },
21171 { 3, 1, 0, -4, 0 },
21172 { 3, 0, 0, -6, 0 },
21173 { 2, 0, 0, 2, 2 },
21174
21175 /* 441-450 */
21176 { 2, -2, 2, 0, 2 },
21177 { 1, 0, 0, -3, 1 },
21178 { 1, -2, -2, 0, -2 },
21179 { 1, -1, -2, -3, -2 },
21180 { 0, 0, 2, -2, -2 },
21181 { 2, 0, -2, -4, 0 },
21182 { 1, 0, -4, 0, 0 },
21183 { 0, 1, 0, -1, 0 },
21184 { 4, 0, 0, 0, -1 },
21185 { 3, 0, 2, -1, 2 },
21186
21187 /* 451-460 */
21188 { 3, -1, 2, 0, 1 },
21189 { 2, 0, 2, -1, 1 },
21190 { 1, 2, 2, -2, 1 },
21191 { 1, 1, 0, 2, -1 },
21192 { 0, 2, 2, 0, 1 },
21193 { 3, 1, 2, 0, 1 },
21194 { 1, 1, 2, 1, 1 },
21195 { 1, 1, 0, -1, 1 },
21196 { 1, -2, 0, -2, -1 },
21197 { 4, 0, 0, -4, 0 },
21198
21199 /* 461-470 */
21200 { 2, 1, 0, 2, 0 },
21201 { 1, -1, 0, 4, 0 },
21202 { 0, 1, 0, -2, 2 },
21203 { 0, 0, 2, 0, -2 },
21204 { 1, 0, -1, 0, 1 },
21205 { 3, 0, 2, -2, 0 },
21206 { 2, 0, 2, 2, 0 },
21207 { 1, 2, 0, -4, 0 },
21208 { 1, -1, 0, -3, 0 },
21209 { 0, 1, 0, 4, 0 },
21210
21211 /* 471 - 480 */
21212 { 0, 1, -2, 0, 0 },
21213 { 2, 2, 2, -2, 2 },
21214 { 0, 0, 0, 1, -2 },
21215 { 0, 2, -2, 0, -1 },
21216 { 4, 0, 2, -4, 2 },
21217 { 2, 0, -4, 2, -2 },
21218 { 2, -1, -2, 0, -2 },
21219 { 1, 1, 4, -2, 2 },
21220 { 1, 1, 2, -4, 2 },
21221 { 1, 0, 2, 3, 2 },
21222
21223 /* 481-490 */
21224 { 1, 0, 0, 4, -1 },
21225 { 0, 0, 0, 4, 2 },
21226 { 2, 0, 0, 4, 0 },
21227 { 1, 1, -2, 2, 0 },
21228 { 2, 1, 2, 1, 2 },
21229 { 2, 1, 2, -4, 1 },
21230 { 2, 0, 2, 1, 1 },
21231 { 2, 0, -4, -2, -1 },
21232 { 2, 0, -2, -6, -1 },
21233 { 2, -1, 2, -1, 2 },
21234
21235 /* 491-500 */
21236 { 1, -2, 2, 0, 1 },
21237 { 1, -2, 0, -2, 1 },
21238 { 1, -1, 0, -4, -1 },
21239 { 0, 2, 2, 2, 2 },
21240 { 0, 2, -2, -4, -2 },
21241 { 0, 1, 2, 3, 2 },
21242 { 0, 1, 0, -4, 1 },
21243 { 3, 0, 0, -2, 1 },
21244 { 2, 1, -2, 0, 1 },
21245 { 2, 0, 4, -2, 1 },
21246
21247 /* 501-510 */
21248 { 2, 0, 0, -3, -1 },
21249 { 2, -2, 0, -2, 1 },
21250 { 2, -1, 2, -2, 1 },
21251 { 1, 0, 0, -6, -1 },
21252 { 1, -2, 0, 0, -1 },
21253 { 1, -2, -2, -2, -1 },
21254 { 0, 1, 4, -2, 1 },
21255 { 0, 0, 2, 3, 1 },
21256 { 2, -1, 0, -1, 0 },
21257 { 1, 3, 0, -2, 0 },
21258
21259 /* 511-520 */
21260 { 0, 3, 0, -2, 0 },
21261 { 2, -2, 2, -2, 2 },
21262 { 0, 0, 4, -2, 0 },
21263 { 4, -1, 2, 0, 2 },
21264 { 2, 2, -2, -4, -2 },
21265 { 4, 1, 2, 0, 2 },
21266 { 4, -1, -2, -2, -2 },
21267 { 2, 1, 0, -2, -2 },
21268 { 2, 1, -2, -6, -2 },
21269 { 2, 0, 0, -1, 1 },
21270
21271 /* 521-530 */
21272 { 2, -1, -2, 2, -1 },
21273 { 1, 1, -2, 2, -2 },
21274 { 1, 1, -2, -3, -2 },
21275 { 1, 0, 3, 0, 3 },
21276 { 1, 0, -2, 1, 1 },
21277 { 1, 0, -2, 0, 2 },
21278 { 1, -1, 2, 1, 2 },
21279 { 1, -1, 0, 0, -2 },
21280 { 1, -1, -4, 2, -2 },
21281 { 0, 3, -2, -2, -2 },
21282
21283 /* 531-540 */
21284 { 0, 1, 0, 4, 1 },
21285 { 0, 0, 4, 2, 2 },
21286 { 3, 0, -2, -2, 0 },
21287 { 2, -2, 0, 0, 0 },
21288 { 1, 1, 2, -4, 0 },
21289 { 1, 1, 0, -3, 0 },
21290 { 1, 0, 2, -3, 0 },
21291 { 1, -1, 2, -2, 0 },
21292 { 0, 2, 0, 2, 0 },
21293 { 0, 0, 2, 4, 0 },
21294
21295 /* 541-550 */
21296 { 1, 0, 1, 0, 0 },
21297 { 3, 1, 2, -2, 1 },
21298 { 3, 0, 4, -2, 2 },
21299 { 3, 0, 2, 1, 2 },
21300 { 3, 0, 0, 2, -1 },
21301 { 3, 0, 0, 0, 2 },
21302 { 3, 0, -2, 2, -1 },
21303 { 2, 0, 4, -4, 2 },
21304 { 2, 0, 2, -3, 2 },
21305 { 2, 0, 0, 4, 1 },
21306
21307 /* 551-560 */
21308 { 2, 0, 0, -3, 1 },
21309 { 2, 0, -4, 2, -1 },
21310 { 2, 0, -2, -2, 1 },
21311 { 2, -2, 2, 2, 2 },
21312 { 2, -2, 0, -2, -2 },
21313 { 2, -1, 0, 2, 1 },
21314 { 2, -1, 0, 2, -1 },
21315 { 1, 1, 2, 4, 2 },
21316 { 1, 1, 0, 1, 1 },
21317 { 1, 1, 0, 1, -1 },
21318
21319 /* 561-570 */
21320 { 1, 1, -2, -6, -2 },
21321 { 1, 0, 0, -3, -1 },
21322 { 1, 0, -4, -2, -1 },
21323 { 1, 0, -2, -6, -1 },
21324 { 1, -2, 2, 2, 1 },
21325 { 1, -2, -2, 2, -1 },
21326 { 1, -1, -2, -4, -1 },
21327 { 0, 2, 0, 0, 2 },
21328 { 0, 1, 2, -4, 2 },
21329 { 0, 1, -2, 4, -1 },
21330
21331 /* 571-580 */
21332 { 5, 0, 0, 0, 0 },
21333 { 3, 0, 0, -3, 0 },
21334 { 2, 2, 0, -4, 0 },
21335 { 1, -1, 2, 2, 0 },
21336 { 0, 1, 0, 3, 0 },
21337 { 4, 0, -2, 0, -1 },
21338 { 3, 0, -2, -6, -1 },
21339 { 3, 0, -2, -1, -1 },
21340 { 2, 1, 2, 2, 1 },
21341 { 2, 1, 0, 2, 1 },
21342
21343 /* 581-590 */
21344 { 2, 0, 2, 4, 1 },
21345 { 2, 0, 2, -6, 1 },
21346 { 2, 0, 2, -2, -1 },
21347 { 2, 0, 0, -6, -1 },
21348 { 2, -1, -2, -2, -1 },
21349 { 1, 2, 2, 0, 1 },
21350 { 1, 2, 0, 0, 1 },
21351 { 1, 0, 4, 0, 1 },
21352 { 1, 0, 2, -6, 1 },
21353 { 1, 0, 2, -4, -1 },
21354
21355 /* 591-600 */
21356 { 1, 0, -1, -2, -1 },
21357 { 1, -1, 2, 4, 1 },
21358 { 1, -1, 2, -3, 1 },
21359 { 1, -1, 0, 4, 1 },
21360 { 1, -1, -2, 1, -1 },
21361 { 0, 1, 2, -2, 3 },
21362 { 3, 0, 0, -2, 0 },
21363 { 1, 0, 1, -2, 0 },
21364 { 0, 2, 0, -4, 0 },
21365 { 0, 0, 2, -4, 0 },
21366
21367 /* 601-610 */
21368 { 0, 0, 1, -1, 0 },
21369 { 0, 0, 0, 6, 0 },
21370 { 0, 2, 0, 0, -2 },
21371 { 0, 1, -2, 2, -3 },
21372 { 4, 0, 0, 2, 0 },
21373 { 3, 0, 0, -1, 0 },
21374 { 3, -1, 0, 2, 0 },
21375 { 2, 1, 0, 1, 0 },
21376 { 2, 1, 0, -6, 0 },
21377 { 2, -1, 2, 0, 0 },
21378
21379 /* 611-620 */
21380 { 1, 0, 2, -1, 0 },
21381 { 1, -1, 0, 1, 0 },
21382 { 1, -1, -2, -2, 0 },
21383 { 0, 1, 2, 2, 0 },
21384 { 0, 0, 2, -3, 0 },
21385 { 2, 2, 0, -2, -1 },
21386 { 2, -1, -2, 0, 1 },
21387 { 1, 2, 2, -4, 1 },
21388 { 0, 1, 4, -4, 2 },
21389 { 0, 0, 0, 3, 2 },
21390
21391 /* 621-630 */
21392 { 5, 0, 2, 0, 1 },
21393 { 4, 1, 2, -2, 2 },
21394 { 4, 0, -2, -2, 0 },
21395 { 3, 1, 2, 2, 2 },
21396 { 3, 1, 0, -2, 0 },
21397 { 3, 1, -2, -6, -2 },
21398 { 3, 0, 0, 0, -2 },
21399 { 3, 0, -2, -4, -2 },
21400 { 3, -1, 0, -3, 0 },
21401 { 3, -1, 0, -2, 0 },
21402
21403 /* 631-640 */
21404 { 2, 1, 2, 0, 0 },
21405 { 2, 1, 2, -4, 2 },
21406 { 2, 1, 2, -2, 0 },
21407 { 2, 1, 0, -3, 0 },
21408 { 2, 1, -2, 0, -2 },
21409 { 2, 0, 0, -4, 2 },
21410 { 2, 0, 0, -4, -2 },
21411 { 2, 0, -2, -5, -2 },
21412 { 2, -1, 2, 4, 2 },
21413 { 2, -1, 0, -2, 2 },
21414
21415 /* 641-650 */
21416 { 1, 3, -2, -2, -2 },
21417 { 1, 1, 0, 0, -2 },
21418 { 1, 1, 0, -6, 0 },
21419 { 1, 1, -2, 1, -2 },
21420 { 1, 1, -2, -1, -2 },
21421 { 1, 0, 2, 1, 0 },
21422 { 1, 0, 0, 3, 0 },
21423 { 1, 0, 0, -4, 2 },
21424 { 1, 0, -2, 4, -2 },
21425 { 1, -2, 0, -1, 0 },
21426
21427 /* 651-NFLS */
21428 { 0, 1, -4, 2, -1 },
21429 { 1, 0, -2, 0, -3 },
21430 { 0, 0, 4, -4, 4 }
21431 };
21432 }
21433
21434
21435 /* Fundamental-argument multipliers: planetary terms */
21436 private static final int mfapl[][] = {
21437
21438 /* 1-10 */
21439 { 0, 0, 1, -1, 1, 0, 0, -1, 0, -2, 5, 0, 0, 0 },
21440 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, -1 },
21441 { 0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0, -2 },
21442 { 0, 0, 1, -1, 1, 0, -8, 12, 0, 0, 0, 0, 0, 0 },
21443 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2 },
21444 { 0, 0, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0 },
21445 { 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0 },
21446 { 0, 0, 0, 0, 0, 0, 0, 8,-16, 4, 5, 0, 0, 0 },
21447 { 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0 },
21448 { 0, 0, 0, 0, 1, 0, 0, -1, 2, 0, 0, 0, 0, 0 },
21449
21450 /* 11-20 */
21451 { 0, 0, 0, 0, 0, 0, 8,-13, 0, 0, 0, 0, 0, -1 },
21452 { 0, 0, 1, -1, 1, 0, 0, -1, 0, 2, -5, 0, 0, 0 },
21453 { 0, 0, 2, -2, 1, 0, -5, 6, 0, 0, 0, 0, 0, 0 },
21454 { 0, 0, 0, 0, 0, 0, 4, -6, 0, 0, 0, 0, 0, -2 },
21455 { 0, 0, 0, 0, 0, 0, 0, 3, 0, -1, 0, 0, 0, 2 },
21456 { 0, 0, 0, 0, 0, 0, 0, 2, -8, 3, 0, 0, 0, -2 },
21457 { 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 0, -2 },
21458 { 0, 0, 0, 0, 0, 0, 0, 6, -8, 3, 0, 0, 0, 2 },
21459 { 0, 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0 },
21460 { 0, 0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0, 0 },
21461
21462 /* 21-30 */
21463 { 0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0 },
21464 { 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2 },
21465 { 0, 0, 0, 0, 1, 0, 0, -4, 8, -3, 0, 0, 0, 0 },
21466 { 0, 0, 0, 0, 1, 0, 0, 4, -8, 3, 0, 0, 0, 0 },
21467 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, 0 },
21468 { 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 2 },
21469 { 0, 0, 1, -1, 1, 0, 0, 0, -2, 0, 0, 0, 0, 0 },
21470 { 2, 0, 0, -2, -1, 0, 0, -2, 0, 2, 0, 0, 0, 0 },
21471 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1 },
21472 { 2, 0, 0, -2, 0, 0, 0, -2, 0, 2, 0, 0, 0, 0 },
21473
21474 /* 31-40 */
21475 { 0, 0, 0, 0, 0, 0, 0, 2, 0, -2, 0, 0, 0, 0 },
21476 { 0, 0, 0, 0, 0, 0, 8,-13, 0, 0, 0, 0, 0, 0 },
21477 { 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 2 },
21478 { 0, 0, 0, 0, 0, 0, 5, -8, 0, 0, 0, 0, 0, -2 },
21479 { 0, 0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0 },
21480 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, 1 },
21481 { 2, 0, 0, -2, 0, 0, 0, -2, 0, 3, 0, 0, 0, 0 },
21482 { 0, 0, 1, -1, 1, 0, 0, -1, 0, -1, 0, 0, 0, 0 },
21483 { 0, 0, 0, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0, 0 },
21484 { 0, 0, 1, -1, 1, 0, 0, -1, 0, 0, -1, 0, 0, 0 },
21485
21486 /* 41-50 */
21487 { 0, 0, 0, 0, 0, 0, 0, 1, 0, -2, 0, 0, 0, 0 },
21488 { 0, 0, 0, 0, 0, 0, 5, -7, 0, 0, 0, 0, 0, -2 },
21489 { 0, 0, 1, -1, 0, 0, 0, 0, -2, 0, 0, 0, 0, 0 },
21490 { 0, 0, 0, 0, 0, 0, 0, 4, 0, -2, 0, 0, 0, 2 },
21491 { 0, 0, 0, 0, 0, 0, 8,-13, 0, 0, 0, 0, 0, -2 },
21492 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 },
21493 { 0, 0, 0, 0, 0, 0, 2, -1, 0, 0, 0, 0, 0, 2 },
21494 { 1, 0, 0, 0, 0, 0,-18, 16, 0, 0, 0, 0, 0, 0 },
21495 { 0, 0, 1, -1, 1, 0, 0, -1, 0, 2, 0, 0, 0, 0 },
21496 { 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2 },
21497
21498 /* 51-60 */
21499 { 0, 0, 1, -1, 1, 0, -5, 7, 0, 0, 0, 0, 0, 0 },
21500 { 1, 0, 0, 0, 0, 0,-10, 3, 0, 0, 0, 0, 0, 0 },
21501 { 0, 0, 2, -2, 0, 0, -5, 6, 0, 0, 0, 0, 0, 0 },
21502 { 0, 0, 0, 0, 0, 0, 0, 2, 0, -1, 0, 0, 0, 2 },
21503 { 1, 0, 2, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
21504 { 0, 0, 0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 2 },
21505 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1 },
21506 { 1, 0, -2, 0, -2, 0, 0, 4, -8, 3, 0, 0, 0, 0 },
21507 { 0, 0, 1, -1, 1, 0, 0, -1, 0, 0, 2, 0, 0, 0 },
21508 { 0, 0, 2, -2, 1, 0, -3, 3, 0, 0, 0, 0, 0, 0 },
21509
21510 /* 61-70 */
21511 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2 },
21512 { 0, 0, 0, 0, 0, 0, 0, 8,-16, 4, 5, 0, 0, -2 },
21513 { 0, 0, 1, -1, 1, 0, 0, 3, -8, 3, 0, 0, 0, 0 },
21514 { 0, 0, 0, 0, 0, 0, 8,-11, 0, 0, 0, 0, 0, -2 },
21515 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 2 },
21516 { 0, 0, 0, 0, 0, 0, 0, 8,-16, 4, 5, 0, 0, 2 },
21517 { 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, -1 },
21518 { 0, 0, 0, 0, 0, 0, 4, -6, 0, 0, 0, 0, 0, -1 },
21519 { 0, 0, 0, 0, 0, 0, 0, 1, 0, -3, 0, 0, 0, -2 },
21520 { 0, 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 0 },
21521
21522 /* 71-80 */
21523 { 0, 0, 0, 0, 0, 0, 6, -8, 0, 0, 0, 0, 0, -2 },
21524 { 0, 0, 0, 0, 0, 0, 3, -2, 0, 0, 0, 0, 0, 2 },
21525 { 0, 0, 0, 0, 0, 0, 8,-15, 0, 0, 0, 0, 0, -2 },
21526 { 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, 0, 0, 0, -2 },
21527 { 0, 0, 0, 0, 0, 0, 1, -3, 0, 0, 0, 0, 0, -2 },
21528 { 0, 0, 0, 0, 0, 0, 0, 3, 0, -2, 0, 0, 0, 2 },
21529 { 0, 0, 1, -1, 1, 0, 0, -5, 8, -3, 0, 0, 0, 0 },
21530 { 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 2 },
21531 { 0, 0, 0, 0, 0, 0, 0, 3, -2, 0, 0, 0, 0, 2 },
21532 { 0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0, 0 },
21533
21534 /* 81-90 */
21535 { 2, 0, 0, -2, 1, 0, 0, -2, 0, 3, 0, 0, 0, 0 },
21536 { 0, 0, 0, 0, 0, 0, 5, -8, 0, 0, 0, 0, 0, -1 },
21537 { 2, 0, 0, -2, 0, 0, -3, 3, 0, 0, 0, 0, 0, 0 },
21538 { 0, 0, 0, 0, 1, 0, 8,-13, 0, 0, 0, 0, 0, 0 },
21539 { 0, 0, 0, 0, 1, 0, 0, 0, 0, -2, 5, 0, 0, 0 },
21540 { 1, 0, 0, -1, 0, 0, -3, 4, 0, 0, 0, 0, 0, 0 },
21541 { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2 },
21542 { 1, 0, 0, 0, -1, 0,-18, 16, 0, 0, 0, 0, 0, 0 },
21543 { 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, -5, 0, 0, 0 },
21544 { 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0 },
21545
21546 /* 91-100 */
21547 { 1, 0, 0, -2, 0, 0, 19,-21, 3, 0, 0, 0, 0, 0 },
21548 { 0, 0, 0, 0, 1, 0, -8, 13, 0, 0, 0, 0, 0, 0 },
21549 { 0, 0, 1, -1, 1, 0, 0, -1, 0, 0, 1, 0, 0, 0 },
21550 { 0, 0, 0, 0, 0, 0, 7, -9, 0, 0, 0, 0, 0, -2 },
21551 { 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2 },
21552 { 1, 0, 0, 0, 1, 0,-18, 16, 0, 0, 0, 0, 0, 0 },
21553 { 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 0, -1 },
21554 { 0, 0, 0, 0, 0, 0, 0, 6,-16, 4, 5, 0, 0, -2 },
21555 { 0, 0, 0, 0, 0, 0, 4, -7, 0, 0, 0, 0, 0, -2 },
21556 { 0, 0, 0, 0, 0, 0, 3, -7, 0, 0, 0, 0, 0, -2 },
21557
21558 /* 101-110 */
21559 { 0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, -1 },
21560 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1 },
21561 { 2, 0, 0, -2, 1, 0, 0, -2, 0, 2, 0, 0, 0, 0 },
21562 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, -1 },
21563 { 0, 0, 0, 0, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0 },
21564 { 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0, 0 },
21565 { 2, 0, 0, -2, -1, 0, 0, -2, 0, 3, 0, 0, 0, 0 },
21566 { 0, 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, 0 },
21567 { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0 },
21568 { 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 2 },
21569
21570 /* 111-120 */
21571 { 0, 0, 0, 0, 1, 0, 0, 1, -2, 0, 0, 0, 0, 0 },
21572 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2 },
21573 { 0, 0, 2, -2, 1, 0, 0, -2, 0, 2, 0, 0, 0, 0 },
21574 { 0, 0, 0, 0, 0, 0, 0, 2, 0, -3, 0, 0, 0, 0 },
21575 { 0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0, -1 },
21576 { 0, 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, 2 },
21577 { 0, 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, 0 },
21578 { 0, 0, 1, -1, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0 },
21579 { 2, 0, 0, -2, 0, 0, -6, 8, 0, 0, 0, 0, 0, 0 },
21580 { 0, 0, 1, -1, 1, 0, 0, -2, 2, 0, 0, 0, 0, 0 },
21581
21582 /* 121-130 */
21583 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1 },
21584 { 0, 0, 1, -1, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0 },
21585 { 0, 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, -1 },
21586 { 0, 0, 0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0 },
21587 { 0, 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, -2 },
21588 { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0 },
21589 { 0, 0, 0, 0, 0, 0, 8,-10, 0, 0, 0, 0, 0, -2 },
21590 { 0, 0, 1, -1, 1, 0, -3, 4, 0, 0, 0, 0, 0, 0 },
21591 { 0, 0, 0, 0, 0, 0, 6, -9, 0, 0, 0, 0, 0, -2 },
21592 { 1, 0, 0, -1, 1, 0, 0, -1, 0, 2, 0, 0, 0, 0 },
21593
21594 /* 131-140 */
21595 { 0, 0, 0, 0, 0, 0, 5, -7, 0, 0, 0, 0, 0, -1 },
21596 { 0, 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 0, 0 },
21597 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -1 },
21598 { 0, 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, -1 },
21599 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 },
21600 { 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 2 },
21601 { 0, 0, 0, 0, 0, 0, 0, 4, 0, -3, 0, 0, 0, 2 },
21602 { 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 1 },
21603 { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1 },
21604 { 0, 0, 0, 0, 1, 0, 2, -3, 0, 0, 0, 0, 0, 0 },
21605
21606 /* 141-150 */
21607 { 1, 0, 0, -1, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0 },
21608 { 0, 0, 0, 0, 0, 0, 1, -3, 0, 0, 0, 0, 0, -1 },
21609 { 0, 0, 0, 0, 0, 0, 0, 5, -4, 0, 0, 0, 0, 2 },
21610 { 0, 0, 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 2 },
21611 { 0, 0, 0, 0, 0, 0, 9,-11, 0, 0, 0, 0, 0, -2 },
21612 { 0, 0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0, -1 },
21613 { 0, 0, 0, 0, 0, 0, 0, 8,-15, 0, 0, 0, 0, 0 },
21614 { 0, 0, 1, -1, 1, 0, -4, 5, 0, 0, 0, 0, 0, 0 },
21615 { 0, 0, 0, 0, 0, 0, 4, -6, 0, 0, 0, 0, 0, 0 },
21616 { 0, 0, 0, 0, 0, 0, 0, 4, 0, -1, 0, 0, 0, 2 },
21617
21618 /* 151-160 */
21619 { 1, 0, 0, -1, 1, 0, -3, 4, 0, 0, 0, 0, 0, 0 },
21620 { 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
21621 { 0, 0, 1, -1, 1, 0, 0, -1, 0, -4, 10, 0, 0, 0 },
21622 { 0, 0, 0, 0, 1, 0, 1, -1, 0, 0, 0, 0, 0, 0 },
21623 { 0, 0, 1, -1, 0, 0, 0, -1, 0, 0, -1, 0, 0, 0 },
21624 { 0, 0, 0, 0, 0, 0, 0, 1, 0, -3, 0, 0, 0, 0 },
21625 { 0, 0, 0, 0, 0, 0, 3, -1, 0, 0, 0, 0, 0, 2 },
21626 { 0, 0, 0, 0, 0, 0, 0, 1, 0, -4, 0, 0, 0, -2 },
21627 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, -2 },
21628 { 0, 0, 2, -2, 1, 0, -4, 4, 0, 0, 0, 0, 0, 0 },
21629
21630 /* 161-170 */
21631 { 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, -1, 0, 0, 2 },
21632 { 0, 0, 0, 0, 0, 0, 0, 4, -3, 0, 0, 0, 0, 2 },
21633 { 0, 0, 1, -1, 1, 0, 0, -1, 0, 0, 0, 0, 2, 0 },
21634 { 0, 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, -1 },
21635 { 0, 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, -1 },
21636 { 0, 0, 0, 0, 0, 0, 5, -8, 0, 0, 0, 0, 0, 0 },
21637 { 0, 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 1 },
21638 { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0 },
21639 { 0, 0, 2, -2, 1, 0, 0, -9, 13, 0, 0, 0, 0, 0 },
21640 { 2, 0, 2, 0, 2, 0, 0, 2, 0, -3, 0, 0, 0, 0 },
21641
21642 /* 171-180 */
21643 { 0, 0, 0, 0, 0, 0, 3, -6, 0, 0, 0, 0, 0, -2 },
21644 { 0, 0, 1, -1, 2, 0, 0, -1, 0, 0, 2, 0, 0, 0 },
21645 { 1, 0, 0, -1, -1, 0, -3, 4, 0, 0, 0, 0, 0, 0 },
21646 { 0, 0, 0, 0, 0, 0, 0, 3, -6, 0, 0, 0, 0, -2 },
21647 { 0, 0, 0, 0, 0, 0, 6, -6, 0, 0, 0, 0, 0, 0 },
21648 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 1 },
21649 { 1, 0, 2, 0, 1, 0, 0, -2, 0, 3, 0, 0, 0, 0 },
21650 { 1, 0, -2, 0, -1, 0, 0, -1, 0, 0, 0, 0, 0, 0 },
21651 { 0, 0, 0, 0, 1, 0, 0, -2, 4, 0, 0, 0, 0, 0 },
21652 { 0, 0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0 },
21653
21654 /* 181-190 */
21655 { 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 2 },
21656 { 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1 },
21657 { 0, 0, 2, 0, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
21658 { 0, 0, 0, 0, 0, 0, 0, 1, -8, 3, 0, 0, 0, -2 },
21659 { 0, 0, 0, 0, 0, 0, 6,-10, 0, 0, 0, 0, 0, -2 },
21660 { 0, 0, 0, 0, 0, 0, 0, 7, -8, 3, 0, 0, 0, 2 },
21661 { 0, 0, 0, 0, 1, 0, -3, 5, 0, 0, 0, 0, 0, 0 },
21662 { 0, 0, 1, -1, 1, 0, -1, 0, 0, 0, 0, 0, 0, 0 },
21663 { 0, 0, 1, -1, 0, 0, -5, 7, 0, 0, 0, 0, 0, 0 },
21664 { 0, 0, 0, 0, 0, 0, 0, 2, 0, -2, 0, 0, 0, 1 },
21665
21666 /* 191-200 */
21667 { 0, 0, 0, 0, 0, 0, 0, 2, 0, -1, 0, 0, 0, 0 },
21668 { 0, 0, 0, 0, 0, 0, 7,-10, 0, 0, 0, 0, 0, -2 },
21669 { 1, 0, 0, -2, 0, 0, 0, -2, 0, 2, 0, 0, 0, 0 },
21670 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0 },
21671 { 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, -5, 0, 0, 0 },
21672 { 0, 0, 0, 0, 0, 0, 6, -8, 0, 0, 0, 0, 0, -1 },
21673 { 0, 0, 1, -1, 1, 0, 0, -9, 15, 0, 0, 0, 0, 0 },
21674 { 0, 0, 0, 0, 1, 0, -2, 3, 0, 0, 0, 0, 0, 0 },
21675 { 0, 0, 0, 0, 1, 0, -1, 1, 0, 0, 0, 0, 0, 0 },
21676 { 0, 0, 0, 0, 0, 0, 0, 3, -6, 0, 0, 0, 0, 0 },
21677
21678 /* 201-210 */
21679 { 0, 0, 0, 0, 0, 0, 0, 1, -4, 0, 0, 0, 0, -2 },
21680 { 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 2 },
21681 { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, -1, 0, 0, 2 },
21682 { 2, 0, 0, -2, 1, 0, -6, 8, 0, 0, 0, 0, 0, 0 },
21683 { 0, 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 0, -1 },
21684 { 0, 0, 1, -1, 1, 0, 3, -6, 0, 0, 0, 0, 0, 0 },
21685 { 0, 0, 1, -1, 1, 0, -2, 2, 0, 0, 0, 0, 0, 0 },
21686 { 0, 0, 1, -1, 1, 0, 8,-14, 0, 0, 0, 0, 0, 0 },
21687 { 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 },
21688 { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
21689
21690 /* 211-220 */
21691 { 0, 0, 0, 0, 1, 0, 0, 8,-15, 0, 0, 0, 0, 0 },
21692 { 0, 0, 0, 0, 0, 0, 0, 4, -6, 0, 0, 0, 0, 0 },
21693 { 0, 0, 0, 0, 0, 0, 7, -7, 0, 0, 0, 0, 0, 0 },
21694 { 2, 0, 0, -2, 1, 0, -3, 3, 0, 0, 0, 0, 0, 0 },
21695 { 0, 0, 0, 0, 0, 0, 0, 3, -1, 0, 0, 0, 0, 2 },
21696 { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 0, 0, 2 },
21697 { 2, 0, -1, -1, 0, 0, 0, 3, -7, 0, 0, 0, 0, 0 },
21698 { 0, 0, 0, 0, 0, 0, 0, 4, -7, 0, 0, 0, 0, -2 },
21699 { 0, 0, 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0 },
21700 { 0, 0, 1, -1, 1, 0, 0, -3, 4, 0, 0, 0, 0, 0 },
21701
21702 /* 221-230 */
21703 { 2, 0, 0, -2, 0, 0, 0, -6, 8, 0, 0, 0, 0, 0 },
21704 { 2, 0, 0, -2, 0, 0, 0, -5, 6, 0, 0, 0, 0, 0 },
21705 { 0, 0, 0, 0, 1, 0, 0, 0, 0, -1, 0, 0, 0, 0 },
21706 { 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1 },
21707 { 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 0, 1 },
21708 { 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 2 },
21709 { 0, 0, 0, 0, 1, 0, 0, 1, 0, -1, 0, 0, 0, 0 },
21710 { 0, 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0 },
21711 { 0, 0, 0, 0, 0, 0, 3, -9, 4, 0, 0, 0, 0, -2 },
21712 { 0, 0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, -2 },
21713
21714 /* 231-240 */
21715 { 0, 0, 0, 0, 0, 0, 0, 2, 0, -4, 0, 0, 0, -2 },
21716 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1 },
21717 { 0, 0, 0, 0, 0, 0, 7,-11, 0, 0, 0, 0, 0, -2 },
21718 { 0, 0, 0, 0, 0, 0, 3, -5, 4, 0, 0, 0, 0, 2 },
21719 { 0, 0, 1, -1, 0, 0, 0, -1, 0, -1, 1, 0, 0, 0 },
21720 { 2, 0, 0, 0, 0, 0, 0, -2, 0, 3, 0, 0, 0, 0 },
21721 { 0, 0, 0, 0, 0, 0, 0, 8,-15, 0, 0, 0, 0, -2 },
21722 { 0, 0, 1, -1, 2, 0, 0, -2, 2, 0, 0, 0, 0, 0 },
21723 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 2 },
21724 { 0, 0, 0, 0, 0, 0, 6, -6, 0, 0, 0, 0, 0, -1 },
21725
21726 /* 241-250 */
21727 { 0, 0, 1, -1, 1, 0, 0, -1, 0, -1, 1, 0, 0, 0 },
21728 { 0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, 1 },
21729 { 0, 0, 0, 0, 0, 0, 0, 4, -7, 0, 0, 0, 0, 0 },
21730 { 0, 0, 0, 0, 0, 0, 0, 3, -8, 3, 0, 0, 0, 0 },
21731 { 0, 0, 1, -1, 1, 0, 2, -4, 0, -3, 0, 0, 0, 0 },
21732 { 0, 0, 0, 0, 1, 0, 3, -5, 0, 2, 0, 0, 0, 0 },
21733 { 0, 0, 0, 0, 0, 0, 0, 3, 0, -3, 0, 0, 0, 2 },
21734 { 0, 0, 2, -2, 2, 0, -8, 11, 0, 0, 0, 0, 0, 0 },
21735 { 0, 0, 0, 0, 0, 0, 0, 5, -8, 3, 0, 0, 0, 0 },
21736 { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -2, 0, 0, 0 },
21737
21738 /* 251-260 */
21739 { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 2 },
21740 { 0, 0, 0, 0, 0, 0, 0, 5, -9, 0, 0, 0, 0, -2 },
21741 { 0, 0, 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 2 },
21742 { 0, 0, 0, 0, 0, 0, 7, -9, 0, 0, 0, 0, 0, -1 },
21743 { 0, 0, 0, 0, 0, 0, 4, -7, 0, 0, 0, 0, 0, -1 },
21744 { 0, 0, 0, 0, 0, 0, 2, -1, 0, 0, 0, 0, 0, 0 },
21745 { 1, 0, -2, -2, -2, 0, 0, -2, 0, 2, 0, 0, 0, 0 },
21746 { 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 2 },
21747 { 0, 0, 0, 0, 0, 0, 0, 2, 0, -2, 5, 0, 0, 2 },
21748 { 0, 0, 0, 0, 0, 0, 3, -3, 0, 0, 0, 0, 0, 1 },
21749
21750 /* 261-270 */
21751 { 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 2 },
21752 { 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, -5, 0, 0, 2 },
21753 { 2, 0, 0, -2, -1, 0, 0, -2, 0, 0, 5, 0, 0, 0 },
21754 { 2, 0, 0, -2, -1, 0, -6, 8, 0, 0, 0, 0, 0, 0 },
21755 { 1, 0, 0, -2, 0, 0, -3, 3, 0, 0, 0, 0, 0, 0 },
21756 { 0, 0, 0, 0, 0, 0, 8, -8, 0, 0, 0, 0, 0, 0 },
21757 { 0, 0, 0, 0, 0, 0, 0, 3, 0, 2, -5, 0, 0, 2 },
21758 { 0, 0, 0, 0, 1, 0, 3, -7, 4, 0, 0, 0, 0, 0 },
21759 { 0, 0, 2, -2, 1, 0, -2, 2, 0, 0, 0, 0, 0, 0 },
21760 { 0, 0, 0, 0, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0 },
21761
21762 /* 271-280 */
21763 { 0, 0, 1, -1, 0, 0, 0, -1, 0, -2, 5, 0, 0, 0 },
21764 { 0, 0, 0, 0, 0, 0, 0, 3, 0, -3, 0, 0, 0, 0 },
21765 { 0, 0, 0, 0, 0, 0, 3, -1, 0, 0, 0, 0, 0, 1 },
21766 { 0, 0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0, -2 },
21767 { 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 2 },
21768 { 0, 0, 0, 0, 0, 0, 0, 6,-15, 0, 0, 0, 0, -2 },
21769 { 0, 0, 0, 0, 0, 0, 0, 3, 0, 1, 0, 0, 0, 2 },
21770 { 1, 0, 0, -1, 0, 0, 0, -3, 4, 0, 0, 0, 0, 0 },
21771 { 0, 0, 0, 0, 1, 0, -3, 7, -4, 0, 0, 0, 0, 0 },
21772 { 0, 0, 0, 0, 0, 0, 0, 5, 0, -2, 0, 0, 0, 2 },
21773
21774 /* 281-290 */
21775 { 0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, 0, 1 },
21776 { 0, 0, 2, -2, 2, 0, -5, 6, 0, 0, 0, 0, 0, 0 },
21777 { 0, 0, 2, -2, 2, 0, -3, 3, 0, 0, 0, 0, 0, 0 },
21778 { 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 2 },
21779 { 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0 },
21780 { 0, 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, 2 },
21781 { 0, 0, 0, 0, 0, 0, 0, 4, -8, 0, 0, 0, 0, -2 },
21782 { 0, 0, 0, 0, 0, 0, 0, 4, -5, 0, 0, 0, 0, 0 },
21783 { 0, 0, 0, 0, 0, 0, 5, -7, 0, 0, 0, 0, 0, 0 },
21784 { 0, 0, 0, 0, 0, 0, 0, 6,-11, 0, 0, 0, 0, -2 },
21785
21786 /* 291-300 */
21787 { 0, 0, 0, 0, 0, 0, 0, 1, -3, 0, 0, 0, 0, -2 },
21788 { 0, 0, 1, -1, 1, 0, 0, -1, 0, 3, 0, 0, 0, 0 },
21789 { 0, 0, 1, -1, 0, 0, 0, -1, 0, 2, 0, 0, 0, 0 },
21790 { 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0, 1 },
21791 { 0, 0, 0, 0, 0, 0, 9,-12, 0, 0, 0, 0, 0, -2 },
21792 { 0, 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0, 1 },
21793 { 0, 0, 1, -1, 0, 0, -8, 12, 0, 0, 0, 0, 0, 0 },
21794 { 0, 0, 1, -1, 1, 0, -2, 3, 0, 0, 0, 0, 0, 0 },
21795 { 0, 0, 0, 0, 0, 0, 7, -7, 0, 0, 0, 0, 0, -1 },
21796 { 0, 0, 0, 0, 0, 0, 0, 3, -6, 0, 0, 0, 0, -1 },
21797
21798 /* 301-310 */
21799 { 0, 0, 0, 0, 0, 0, 0, 6, -6, 0, 0, 0, 0, 2 },
21800 { 0, 0, 0, 0, 0, 1, 0, -4, 0, 0, 0, 0, 0, -2 },
21801 { 0, 0, 1, -1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
21802 { 0, 0, 0, 0, 0, 0, 6, -9, 0, 0, 0, 0, 0, -1 },
21803 { 0, 0, 1, -1, -1, 0, 0, 0, -2, 0, 0, 0, 0, 0 },
21804 { 0, 0, 0, 0, 0, 0, 0, 1, -5, 0, 0, 0, 0, -2 },
21805 { 2, 0, 0, -2, 0, 0, 0, -2, 0, 3, -1, 0, 0, 0 },
21806 { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, -2, 0, 0, 0 },
21807 { 0, 0, 0, 0, 0, 0, 0, 5, -9, 0, 0, 0, 0, 0 },
21808 { 0, 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0, 2 },
21809
21810 /* 311-320 */
21811 { 0, 0, 0, 0, 0, 0, 9, -9, 0, 0, 0, 0, 0, -1 },
21812 { 0, 0, 1, -1, 1, 0, 0, -1, 0, 0, 3, 0, 0, 0 },
21813 { 0, 0, 0, 0, 1, 0, 0, 2, -4, 0, 0, 0, 0, 0 },
21814 { 0, 0, 0, 0, 0, 0, 5, -3, 0, 0, 0, 0, 0, 2 },
21815 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 1 },
21816 { 0, 0, 1, -1, 2, 0, 0, -1, 0, 2, 0, 0, 0, 0 },
21817 { 0, 0, 0, 0, 0, 0, 5, -9, 0, 0, 0, 0, 0, -2 },
21818 { 0, 0, 0, 0, 0, 0, 0, 5, -3, 0, 0, 0, 0, 2 },
21819 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 2 },
21820 { 0, 0, 2, 0, 2, 0, 0, 4, -8, 3, 0, 0, 0, 0 },
21821
21822 /* 321-330 */
21823 { 0, 0, 2, 0, 2, 0, 0, -4, 8, -3, 0, 0, 0, 0 },
21824 { 0, 0, 0, 0, 0, 0, 0, 5, 0, -3, 0, 0, 0, 2 },
21825 { 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0 },
21826 { 2, 0, -1, -1, -1, 0, 0, -1, 0, 3, 0, 0, 0, 0 },
21827 { 0, 0, 0, 0, 0, 0, 4, -3, 0, 0, 0, 0, 0, 2 },
21828 { 0, 0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 0, 2 },
21829 { 0, 0, 0, 0, 0, 0, 5,-10, 0, 0, 0, 0, 0, -2 },
21830 { 0, 0, 0, 0, 0, 0, 8,-13, 0, 0, 0, 0, 0, 1 },
21831 { 0, 0, 2, -2, 1, -1, 0, 2, 0, 0, 0, 0, 0, 0 },
21832 { 0, 0, 1, -1, 1, 0, 0, -1, 0, 0, 0, 2, 0, 0 },
21833
21834 /* 331-340 */
21835 { 0, 0, 0, 0, 1, 0, 3, -5, 0, 0, 0, 0, 0, 0 },
21836 { 1, 0, 0, -2, 0, 0, 0, -2, 0, 3, 0, 0, 0, 0 },
21837 { 0, 0, 2, -2, 0, 0, -3, 3, 0, 0, 0, 0, 0, 0 },
21838 { 0, 0, 0, 0, 0, 0, 9, -9, 0, 0, 0, 0, 0, 0 },
21839 { 0, 0, 2, 0, 2, 0, 1, -1, 0, 0, 0, 0, 0, 0 },
21840 { 0, 0, 2, -2, 1, 0, 0, -8, 11, 0, 0, 0, 0, 0 },
21841 { 0, 0, 2, -2, 1, 0, 0, -2, 0, 0, 2, 0, 0, 0 },
21842 { 0, 0, 1, -1, 1, 0, 0, -1, 0, -1, 2, 0, 0, 0 },
21843 { 0, 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 0, 2 },
21844 { 0, 0, 0, 0, 0, 0, 2, -6, 0, 0, 0, 0, 0, -2 },
21845
21846 /* 341-350 */
21847 { 0, 0, 0, 0, 0, 0, 0, 8,-15, 0, 0, 0, 0, -1 },
21848 { 0, 0, 0, 0, 0, 0, 0, 5, -2, 0, 0, 0, 0, 2 },
21849 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2 },
21850 { 0, 0, 0, 0, 0, 0, 0, 7,-13, 0, 0, 0, 0, -2 },
21851 { 0, 0, 0, 0, 0, 0, 0, 3, 0, -2, 0, 0, 0, 0 },
21852 { 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 2 },
21853 { 0, 0, 2, -2, 1, 0, 0, -2, 0, 3, 0, 0, 0, 0 },
21854 { 0, 0, 0, 0, 0, 0, 8, -8, 0, 0, 0, 0, 0, -1 },
21855 { 0, 0, 0, 0, 0, 0, 8,-10, 0, 0, 0, 0, 0, -1 },
21856 { 0, 0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 0, 1 },
21857
21858 /* 351-360 */
21859 { 0, 0, 0, 0, 0, 0, 3, -6, 0, 0, 0, 0, 0, -1 },
21860 { 0, 0, 0, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0, -1 },
21861 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, 2 },
21862 { 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 2 },
21863 { 0, 0, 0, 0, 0, 0, 0, 2, 0, -4, 0, 0, 0, 0 },
21864 { 2, 0, 0, -2, -1, 0, 0, -5, 6, 0, 0, 0, 0, 0 },
21865 { 0, 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, 0, 0, -2 },
21866 { 2, 0, -1, -1, -1, 0, 0, 3, -7, 0, 0, 0, 0, 0 },
21867 { 0, 0, 0, 0, 0, 0, 0, 5, -8, 0, 0, 0, 0, 0 },
21868 { 0, 0, 2, 0, 2, 0, -1, 1, 0, 0, 0, 0, 0, 0 },
21869
21870 /* 361-370 */
21871 { 2, 0, 0, -2, 0, 0, 0, -2, 0, 4, -3, 0, 0, 0 },
21872 { 0, 0, 0, 0, 0, 0, 0, 6,-11, 0, 0, 0, 0, 0 },
21873 { 2, 0, 0, -2, 1, 0, 0, -6, 8, 0, 0, 0, 0, 0 },
21874 { 0, 0, 0, 0, 0, 0, 0, 4, -8, 1, 5, 0, 0, -2 },
21875 { 0, 0, 0, 0, 0, 0, 0, 6, -5, 0, 0, 0, 0, 2 },
21876 { 1, 0, -2, -2, -2, 0, -3, 3, 0, 0, 0, 0, 0, 0 },
21877 { 0, 0, 1, -1, 2, 0, 0, 0, -2, 0, 0, 0, 0, 0 },
21878 { 0, 0, 0, 0, 2, 0, 0, 4, -8, 3, 0, 0, 0, 0 },
21879 { 0, 0, 0, 0, 2, 0, 0, -4, 8, -3, 0, 0, 0, 0 },
21880 { 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 1 },
21881
21882 /* 371-380 */
21883 { 0, 0, 0, 0, 0, 0, 0, 6, -7, 0, 0, 0, 0, 2 },
21884 { 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, -2, 0, 0, 2 },
21885 { 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, -2, 0, 0, 2 },
21886 { 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 1 },
21887 { 0, 0, 0, 0, 0, 0, 0, 1, -6, 0, 0, 0, 0, -2 },
21888 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, -5, 0, 0, 2 },
21889 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2 },
21890 { 0, 0, 0, 0, 0, 0, 3, -5, 0, 2, 0, 0, 0, 0 },
21891 { 0, 0, 0, 0, 0, 0, 0, 7,-13, 0, 0, 0, 0, 0 },
21892 { 0, 0, 0, 0, 0, 0, 0, 2, 0, -2, 0, 0, 0, 2 },
21893
21894 /* 381-390 */
21895 { 0, 0, 1, -1, 0, 0, 0, -1, 0, 0, 2, 0, 0, 0 },
21896 { 0, 0, 0, 0, 1, 0, 0, -8, 15, 0, 0, 0, 0, 0 },
21897 { 2, 0, 0, -2, -2, 0, -3, 3, 0, 0, 0, 0, 0, 0 },
21898 { 2, 0, -1, -1, -1, 0, 0, -1, 0, 2, 0, 0, 0, 0 },
21899 { 1, 0, 2, -2, 2, 0, 0, -2, 0, 2, 0, 0, 0, 0 },
21900 { 1, 0, -1, 1, -1, 0,-18, 17, 0, 0, 0, 0, 0, 0 },
21901 { 0, 0, 2, 0, 2, 0, 0, 1, 0, -1, 0, 0, 0, 0 },
21902 { 0, 0, 2, 0, 2, 0, 0, -1, 0, 1, 0, 0, 0, 0 },
21903 { 0, 0, 2, -2, -1, 0, -5, 6, 0, 0, 0, 0, 0, 0 },
21904 { 0, 0, 1, -1, 2, 0, 0, -1, 0, 1, 0, 0, 0, 0 },
21905
21906 /* 391-400 */
21907 { 0, 0, 0, 0, 1, 0, 2, -2, 0, 0, 0, 0, 0, 0 },
21908 { 0, 0, 0, 0, 0, 0, 8,-16, 0, 0, 0, 0, 0, -2 },
21909 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 2 },
21910 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2 },
21911 { 0, 0, 0, 0, 2, 0, 0, -1, 2, 0, 0, 0, 0, 0 },
21912 { 2, 0, -1, -1, -2, 0, 0, -1, 0, 2, 0, 0, 0, 0 },
21913 { 0, 0, 0, 0, 0, 0, 6,-10, 0, 0, 0, 0, 0, -1 },
21914 { 0, 0, 1, -1, 1, 0, 0, -1, 0, -2, 4, 0, 0, 0 },
21915 { 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 2 },
21916 { 2, 0, 0, -2, -1, 0, 0, -2, 0, 4, -5, 0, 0, 0 },
21917
21918 /* 401-410 */
21919 { 2, 0, 0, -2, -1, 0, -3, 3, 0, 0, 0, 0, 0, 0 },
21920 { 2, 0, -1, -1, -1, 0, 0, -1, 0, 0, 0, 0, 0, 0 },
21921 { 1, 0, 1, -1, 1, 0, 0, -1, 0, 0, 0, 0, 0, 0 },
21922 { 1, 0, 0, -1, -1, 0, 0, -2, 2, 0, 0, 0, 0, 0 },
21923 { 1, 0, -1, -1, -1, 0, 20,-20, 0, 0, 0, 0, 0, 0 },
21924 { 0, 0, 2, -2, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0 },
21925 { 0, 0, 1, -1, 1, 0, 1, -2, 0, 0, 0, 0, 0, 0 },
21926 { 0, 0, 1, -1, 1, 0, -2, 1, 0, 0, 0, 0, 0, 0 },
21927 { 0, 0, 0, 0, 1, 0, 5, -8, 0, 0, 0, 0, 0, 0 },
21928 { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, -1, 0, 0, 0 },
21929
21930 /* 411-420 */
21931 { 0, 0, 0, 0, 0, 0, 9,-11, 0, 0, 0, 0, 0, -1 },
21932 { 0, 0, 0, 0, 0, 0, 5, -3, 0, 0, 0, 0, 0, 1 },
21933 { 0, 0, 0, 0, 0, 0, 0, 1, 0, -3, 0, 0, 0, -1 },
21934 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1 },
21935 { 0, 0, 0, 0, 0, 0, 6, -7, 0, 0, 0, 0, 0, 0 },
21936 { 0, 0, 0, 0, 0, 0, 0, 3, -2, 0, 0, 0, 0, 0 },
21937 { 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0, -2 },
21938 { 0, 0, 1, -1, 1, 0, 0, -1, 0, 0, -2, 0, 0, 0 },
21939 { 0, 0, 1, -1, 2, 0, 0, -1, 0, -2, 5, 0, 0, 0 },
21940 { 0, 0, 0, 0, 0, 0, 0, 5, -7, 0, 0, 0, 0, 0 },
21941
21942 /* 421-430 */
21943 { 0, 0, 0, 0, 0, 0, 1, -3, 0, 0, 0, 0, 0, 0 },
21944 { 0, 0, 0, 0, 0, 0, 0, 5, -8, 0, 0, 0, 0, -2 },
21945 { 0, 0, 0, 0, 0, 0, 0, 2, -6, 0, 0, 0, 0, -2 },
21946 { 1, 0, 0, -2, 0, 0, 20,-21, 0, 0, 0, 0, 0, 0 },
21947 { 0, 0, 0, 0, 0, 0, 8,-12, 0, 0, 0, 0, 0, 0 },
21948 { 0, 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0, 0 },
21949 { 0, 0, 0, 0, 0, 0, 0, 4, -4, 0, 0, 0, 0, 0 },
21950 { 0, 0, 1, -1, 2, 0, 0, -1, 0, -1, 0, 0, 0, 0 },
21951 { 0, 0, 0, 0, 0, 0, 8,-12, 0, 0, 0, 0, 0, -2 },
21952 { 0, 0, 0, 0, 0, 0, 0, 9,-17, 0, 0, 0, 0, 0 },
21953
21954 /* 431-440 */
21955 { 0, 0, 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 2 },
21956 { 0, 0, 0, 0, 0, 0, 0, 4, -8, 1, 5, 0, 0, 2 },
21957 { 0, 0, 0, 0, 0, 0, 0, 4, -6, 0, 0, 0, 0, -2 },
21958 { 0, 0, 0, 0, 0, 0, 0, 2, -7, 0, 0, 0, 0, -2 },
21959 { 1, 0, 0, -1, 1, 0, 0, -3, 4, 0, 0, 0, 0, 0 },
21960 { 1, 0, -2, 0, -2, 0,-10, 3, 0, 0, 0, 0, 0, 0 },
21961 { 0, 0, 0, 0, 1, 0, 0, -9, 17, 0, 0, 0, 0, 0 },
21962 { 0, 0, 0, 0, 0, 0, 1, -4, 0, 0, 0, 0, 0, -2 },
21963 { 1, 0, -2, -2, -2, 0, 0, -2, 0, 3, 0, 0, 0, 0 },
21964 { 1, 0, -1, 1, -1, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
21965
21966 /* 441-450 */
21967 { 0, 0, 2, -2, 2, 0, 0, -2, 0, 2, 0, 0, 0, 0 },
21968 { 0, 0, 1, -1, 2, 0, 0, -1, 0, 0, 1, 0, 0, 0 },
21969 { 0, 0, 1, -1, 2, 0, -5, 7, 0, 0, 0, 0, 0, 0 },
21970 { 0, 0, 0, 0, 1, 0, 0, 2, -2, 0, 0, 0, 0, 0 },
21971 { 0, 0, 0, 0, 0, 0, 4, -5, 0, 0, 0, 0, 0, -1 },
21972 { 0, 0, 0, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0, -2 },
21973 { 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 0, 0 },
21974 { 0, 0, 0, 0, 0, 0, 0, 5,-10, 0, 0, 0, 0, -2 },
21975 { 0, 0, 0, 0, 0, 0, 0, 4, 0, -4, 0, 0, 0, 2 },
21976 { 0, 0, 0, 0, 0, 0, 0, 2, 0, -5, 0, 0, 0, -2 },
21977
21978 /* 451-460 */
21979 { 0, 0, 0, 0, 0, 0, 0, 1, 0, -5, 0, 0, 0, -2 },
21980 { 0, 0, 0, 0, 0, 0, 0, 1, 0, -2, 5, 0, 0, 2 },
21981 { 0, 0, 0, 0, 0, 0, 0, 1, 0, -2, 0, 0, 0, -2 },
21982 { 0, 0, 0, 0, 0, 0, 2, -3, 0, 0, 0, 0, 0, 1 },
21983 { 1, 0, 0, -2, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0 },
21984 { 0, 0, 0, 0, 0, 0, 3, -7, 4, 0, 0, 0, 0, 0 },
21985 { 2, 0, 2, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
21986 { 0, 0, 1, -1, -1, 0, 0, -1, 0, -1, 0, 0, 0, 0 },
21987 { 0, 0, 0, 0, 1, 0, 0, 1, 0, -2, 0, 0, 0, 0 },
21988 { 0, 0, 0, 0, 0, 0, 0, 6,-10, 0, 0, 0, 0, -2 },
21989
21990 /* 461-470 */
21991 { 1, 0, 0, -1, 1, 0, 0, -1, 0, 1, 0, 0, 0, 0 },
21992 { 0, 0, 2, -2, 1, 0, 0, 4, -8, 3, 0, 0, 0, 0 },
21993 { 0, 0, 2, -2, 1, 0, 0, 1, 0, -1, 0, 0, 0, 0 },
21994 { 0, 0, 2, -2, 1, 0, 0, -4, 8, -3, 0, 0, 0, 0 },
21995 { 0, 0, 2, -2, 1, 0, 0, -3, 0, 3, 0, 0, 0, 0 },
21996 { 0, 0, 2, -2, 1, 0, -5, 5, 0, 0, 0, 0, 0, 0 },
21997 { 0, 0, 1, -1, 1, 0, 1, -3, 0, 0, 0, 0, 0, 0 },
21998 { 0, 0, 1, -1, 1, 0, 0, -4, 6, 0, 0, 0, 0, 0 },
21999 { 0, 0, 1, -1, 1, 0, 0, -1, 0, 0, 0, -1, 0, 0 },
22000 { 0, 0, 1, -1, 1, 0, -5, 6, 0, 0, 0, 0, 0, 0 },
22001
22002 /* 471-480 */
22003 { 0, 0, 0, 0, 1, 0, 3, -4, 0, 0, 0, 0, 0, 0 },
22004 { 0, 0, 0, 0, 1, 0, -2, 2, 0, 0, 0, 0, 0, 0 },
22005 { 0, 0, 0, 0, 0, 0, 7,-10, 0, 0, 0, 0, 0, -1 },
22006 { 0, 0, 0, 0, 0, 0, 5, -5, 0, 0, 0, 0, 0, 1 },
22007 { 0, 0, 0, 0, 0, 0, 4, -5, 0, 0, 0, 0, 0, -2 },
22008 { 0, 0, 0, 0, 0, 0, 3, -8, 0, 0, 0, 0, 0, -2 },
22009 { 0, 0, 0, 0, 0, 0, 2, -5, 0, 0, 0, 0, 0, -1 },
22010 { 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0, 0, 0, -1 },
22011 { 0, 0, 0, 0, 0, 0, 0, 7, -9, 0, 0, 0, 0, 2 },
22012 { 0, 0, 0, 0, 0, 0, 0, 7, -8, 0, 0, 0, 0, 2 },
22013
22014 /* 481-490 */
22015 { 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 2 },
22016 { 0, 0, 0, 0, 0, 0, 0, 3, -8, 3, 0, 0, 0, -2 },
22017 { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, -2, 0, 0, 1 },
22018 { 0, 0, 0, 0, 0, 0, 0, 2, -4, 0, 0, 0, 0, 1 },
22019 { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, -1 },
22020 { 0, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, -1 },
22021 { 2, 0, 0, -2, -1, 0, 0, -6, 8, 0, 0, 0, 0, 0 },
22022 { 2, 0, -1, -1, 1, 0, 0, 3, -7, 0, 0, 0, 0, 0 },
22023 { 0, 0, 2, -2, 1, 0, 0, -7, 9, 0, 0, 0, 0, 0 },
22024 { 0, 0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0, 0, -1 },
22025
22026 /* 491-500 */
22027 { 0, 0, 1, -1, 2, 0, -8, 12, 0, 0, 0, 0, 0, 0 },
22028 { 1, 0, 0, 0, 0, 0, 0, -2, 0, 2, 0, 0, 0, 0 },
22029 { 1, 0, 0, -2, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0 },
22030 { 0, 0, 0, 0, 0, 0, 7, -8, 0, 0, 0, 0, 0, 0 },
22031 { 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0 },
22032 { 2, 0, 0, -2, 1, 0, 0, -5, 6, 0, 0, 0, 0, 0 },
22033 { 2, 0, 0, -2, -1, 0, 0, -2, 0, 3, -1, 0, 0, 0 },
22034 { 1, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
22035 { 1, 0, 0, -2, 1, 0, 0, -2, 0, 2, 0, 0, 0, 0 },
22036 { 1, 0, 0, -2, -1, 0, 0, -2, 0, 2, 0, 0, 0, 0 },
22037
22038 /* 501-510 */
22039 { 1, 0, 0, -1, -1, 0, 0, -3, 4, 0, 0, 0, 0, 0 },
22040 { 1, 0, -1, 0, -1, 0, -3, 5, 0, 0, 0, 0, 0, 0 },
22041 { 0, 0, 2, -2, 1, 0, 0, -4, 4, 0, 0, 0, 0, 0 },
22042 { 0, 0, 2, -2, 1, 0, 0, -2, 0, 0, 0, 0, 0, 0 },
22043 { 0, 0, 2, -2, 1, 0, -8, 11, 0, 0, 0, 0, 0, 0 },
22044 { 0, 0, 2, -2, 0, 0, 0, -9, 13, 0, 0, 0, 0, 0 },
22045 { 0, 0, 1, 1, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
22046 { 0, 0, 1, -1, 1, 0, 0, 1, -4, 0, 0, 0, 0, 0 },
22047 { 0, 0, 1, -1, 1, 0, 0, -1, 0, 1, -3, 0, 0, 0 },
22048 { 0, 0, 0, 0, 1, 0, 0, 7,-13, 0, 0, 0, 0, 0 },
22049
22050 /* 511-520 */
22051 { 0, 0, 0, 0, 1, 0, 0, 2, 0, -2, 0, 0, 0, 0 },
22052 { 0, 0, 0, 0, 1, 0, 0, -2, 2, 0, 0, 0, 0, 0 },
22053 { 0, 0, 0, 0, 1, 0, -3, 4, 0, 0, 0, 0, 0, 0 },
22054 { 0, 0, 0, 0, 0, 1, 0, -4, 0, 0, 0, 0, 0, 0 },
22055 { 0, 0, 0, 0, 0, 0, 7,-11, 0, 0, 0, 0, 0, -1 },
22056 { 0, 0, 0, 0, 0, 0, 6, -6, 0, 0, 0, 0, 0, 1 },
22057 { 0, 0, 0, 0, 0, 0, 6, -4, 0, 0, 0, 0, 0, 1 },
22058 { 0, 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0, -1 },
22059 { 0, 0, 0, 0, 0, 0, 4, -2, 0, 0, 0, 0, 0, 0 },
22060 { 0, 0, 0, 0, 0, 0, 3, -4, 0, 0, 0, 0, 0, 1 },
22061
22062 /* 521-530 */
22063 { 0, 0, 0, 0, 0, 0, 1, -4, 0, 0, 0, 0, 0, -1 },
22064 { 0, 0, 0, 0, 0, 0, 0, 9,-17, 0, 0, 0, 0, -2 },
22065 { 0, 0, 0, 0, 0, 0, 0, 7, -7, 0, 0, 0, 0, 2 },
22066 { 0, 0, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, 1 },
22067 { 0, 0, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, -1 },
22068 { 0, 0, 0, 0, 0, 0, 0, 4, -8, 0, 0, 0, 0, 0 },
22069 { 0, 0, 0, 0, 0, 0, 0, 4, -7, 0, 0, 0, 0, -1 },
22070 { 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1 },
22071 { 0, 0, 0, 0, 0, 0, 0, 1, 0, -4, 0, 0, 0, 0 },
22072 { 2, 0, 0, -2, 0, 0, 0, -4, 8, -3, 0, 0, 0, 0 },
22073
22074 /* 531-540 */
22075 { 2, 0, 0, -2, 0, 0, -2, 2, 0, 0, 0, 0, 0, 0 },
22076 { 1, 0, 0, 0, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0 },
22077 { 1, 0, 0, 0, 0, 0, 0, -4, 8, -3, 0, 0, 0, 0 },
22078 { 1, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0 },
22079 { 1, 0, 0, -2, 0, 0, 17,-16, 0, -2, 0, 0, 0, 0 },
22080 { 1, 0, 0, -1, 0, 0, 0, -2, 2, 0, 0, 0, 0, 0 },
22081 { 0, 0, 2, -2, 0, 0, 0, -2, 0, 2, 0, 0, 0, 0 },
22082 { 0, 0, 0, 0, 0, 0, 0, 6, -9, 0, 0, 0, 0, 0 },
22083 { 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0 },
22084 { 0, 0, 0, 0, 0, 0, 0, 3, 0, -4, 0, 0, 0, 0 },
22085
22086 /* 541-550 */
22087 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -2, -2 },
22088 { 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 2 },
22089 { 2, 0, 0, -2, 0, 0, 0, -4, 4, 0, 0, 0, 0, 0 },
22090 { 2, 0, 0, -2, 0, 0, 0, -2, 0, 2, 2, 0, 0, 0 },
22091 { 1, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0 },
22092 { 1, 0, 0, 0, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0 },
22093 { 1, 0, 0, 0, 0, 0, -3, 3, 0, 0, 0, 0, 0, 0 },
22094 { 1, 0, 0, -2, 0, 0, 1, -1, 0, 0, 0, 0, 0, 0 },
22095 { 1, 0, 0, -2, 0, 0, 0, 4, -8, 3, 0, 0, 0, 0 },
22096 { 1, 0, 0, -2, 0, 0, 0, -4, 8, -3, 0, 0, 0, 0 },
22097
22098 /* 551-560 */
22099 { 1, 0, 0, -2, 0, 0, -2, 2, 0, 0, 0, 0, 0, 0 },
22100 { 0, 0, 2, -2, 0, 0, -4, 4, 0, 0, 0, 0, 0, 0 },
22101 { 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
22102 { 0, 0, 1, -1, 0, 0, 3, -6, 0, 0, 0, 0, 0, 0 },
22103 { 0, 0, 1, -1, 0, 0, 0, -2, 2, 0, 0, 0, 0, 0 },
22104 { 0, 0, 1, -1, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0 },
22105 { 0, 0, 1, -1, 0, 0, 0, -1, 0, 0, 1, 0, 0, 0 },
22106 { 0, 0, 1, -1, 0, 0, -4, 5, 0, 0, 0, 0, 0, 0 },
22107 { 0, 0, 1, -1, 0, 0, -3, 4, 0, 0, 0, 0, 0, 0 },
22108 { 0, 0, 0, 2, 0, 0, 0, -1, 0, 1, 0, 0, 0, 0 },
22109
22110 /* 561-570 */
22111 { 0, 0, 0, 0, 0, 0, 8, -9, 0, 0, 0, 0, 0, 0 },
22112 { 0, 0, 0, 0, 0, 0, 3, -6, 0, 0, 0, 0, 0, 0 },
22113 { 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0 },
22114 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, -5, 0, 0, 0 },
22115 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 0 },
22116 { 2, 0, -2, -2, -2, 0, 0, -2, 0, 2, 0, 0, 0, 0 },
22117 { 1, 0, 0, 0, 1, 0,-10, 3, 0, 0, 0, 0, 0, 0 },
22118 { 1, 0, 0, 0, -1, 0,-10, 3, 0, 0, 0, 0, 0, 0 },
22119 { 0, 0, 2, 0, 2, 0, 2, -3, 0, 0, 0, 0, 0, 0 },
22120 { 0, 0, 2, 0, 2, 0, 2, -2, 0, 0, 0, 0, 0, 0 },
22121
22122 /* 571-580 */
22123 { 0, 0, 2, 0, 2, 0, -2, 3, 0, 0, 0, 0, 0, 0 },
22124 { 0, 0, 2, 0, 2, 0, -2, 2, 0, 0, 0, 0, 0, 0 },
22125 { 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0 },
22126 { 0, 0, 0, 0, 1, 0, 0, -1, 0, 2, 0, 0, 0, 0 },
22127 { 2, 0, 2, -2, 2, 0, 0, -2, 0, 3, 0, 0, 0, 0 },
22128 { 2, 0, 1, -3, 1, 0, -6, 7, 0, 0, 0, 0, 0, 0 },
22129 { 2, 0, 0, -2, 0, 0, 2, -5, 0, 0, 0, 0, 0, 0 },
22130 { 2, 0, 0, -2, 0, 0, 0, -2, 0, 5, -5, 0, 0, 0 },
22131 { 2, 0, 0, -2, 0, 0, 0, -2, 0, 1, 5, 0, 0, 0 },
22132 { 2, 0, 0, -2, 0, 0, 0, -2, 0, 0, 5, 0, 0, 0 },
22133
22134 /* 581-590 */
22135 { 2, 0, 0, -2, 0, 0, 0, -2, 0, 0, 2, 0, 0, 0 },
22136 { 2, 0, 0, -2, 0, 0, -4, 4, 0, 0, 0, 0, 0, 0 },
22137 { 2, 0, -2, 0, -2, 0, 0, 5, -9, 0, 0, 0, 0, 0 },
22138 { 2, 0, -1, -1, 0, 0, 0, -1, 0, 3, 0, 0, 0, 0 },
22139 { 1, 0, 2, 0, 2, 0, 1, -1, 0, 0, 0, 0, 0, 0 },
22140 { 1, 0, 2, 0, 2, 0, 0, 4, -8, 3, 0, 0, 0, 0 },
22141 { 1, 0, 2, 0, 2, 0, 0, -4, 8, -3, 0, 0, 0, 0 },
22142 { 1, 0, 2, 0, 2, 0, -1, 1, 0, 0, 0, 0, 0, 0 },
22143 { 1, 0, 2, -2, 2, 0, -3, 3, 0, 0, 0, 0, 0, 0 },
22144 { 1, 0, 0, 0, 0, 0, 0, 1, 0, -1, 0, 0, 0, 0 },
22145
22146 /* 591-600 */
22147 { 1, 0, 0, 0, 0, 0, 0, -2, 0, 3, 0, 0, 0, 0 },
22148 { 1, 0, 0, -2, 0, 0, 0, 2, 0, -2, 0, 0, 0, 0 },
22149 { 1, 0, -2, -2, -2, 0, 0, 1, 0, -1, 0, 0, 0, 0 },
22150 { 1, 0, -1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
22151 { 1, 0, -1, -1, 0, 0, 0, 8,-15, 0, 0, 0, 0, 0 },
22152 { 0, 0, 2, 2, 2, 0, 0, 2, 0, -2, 0, 0, 0, 0 },
22153 { 0, 0, 2, -2, 1, 0, 1, -1, 0, 0, 0, 0, 0, 0 },
22154 { 0, 0, 2, -2, 1, 0, 0, -2, 0, 1, 0, 0, 0, 0 },
22155 { 0, 0, 2, -2, 1, 0, 0,-10, 15, 0, 0, 0, 0, 0 },
22156 { 0, 0, 2, -2, 0, -1, 0, 2, 0, 0, 0, 0, 0, 0 },
22157
22158 /* 601-610 */
22159 { 0, 0, 1, -1, 2, 0, 0, -1, 0, 0, -1, 0, 0, 0 },
22160 { 0, 0, 1, -1, 2, 0, -3, 4, 0, 0, 0, 0, 0, 0 },
22161 { 0, 0, 1, -1, 1, 0, -4, 6, 0, 0, 0, 0, 0, 0 },
22162 { 0, 0, 1, -1, 1, 0, -1, 2, 0, 0, 0, 0, 0, 0 },
22163 { 0, 0, 1, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0 },
22164 { 0, 0, 1, -1, 0, 0, 0, -1, 0, 0, -2, 0, 0, 0 },
22165 { 0, 0, 1, -1, 0, 0, -2, 2, 0, 0, 0, 0, 0, 0 },
22166 { 0, 0, 1, -1, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0 },
22167 { 0, 0, 1, -1, -1, 0, -5, 7, 0, 0, 0, 0, 0, 0 },
22168 { 0, 0, 0, 2, 0, 0, 0, 2, 0, -2, 0, 0, 0, 0 },
22169
22170 /* 611-620 */
22171 { 0, 0, 0, 2, 0, 0, -2, 2, 0, 0, 0, 0, 0, 0 },
22172 { 0, 0, 0, 0, 2, 0, -3, 5, 0, 0, 0, 0, 0, 0 },
22173 { 0, 0, 0, 0, 1, 0, -1, 2, 0, 0, 0, 0, 0, 0 },
22174 { 0, 0, 0, 0, 0, 0, 9,-13, 0, 0, 0, 0, 0, -2 },
22175 { 0, 0, 0, 0, 0, 0, 8,-14, 0, 0, 0, 0, 0, -2 },
22176 { 0, 0, 0, 0, 0, 0, 8,-11, 0, 0, 0, 0, 0, -1 },
22177 { 0, 0, 0, 0, 0, 0, 6, -9, 0, 0, 0, 0, 0, 0 },
22178 { 0, 0, 0, 0, 0, 0, 6, -8, 0, 0, 0, 0, 0, 0 },
22179 { 0, 0, 0, 0, 0, 0, 6, -7, 0, 0, 0, 0, 0, -1 },
22180 { 0, 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0, -2 },
22181
22182 /* 621-630 */
22183 { 0, 0, 0, 0, 0, 0, 5, -6, -4, 0, 0, 0, 0, -2 },
22184 { 0, 0, 0, 0, 0, 0, 5, -4, 0, 0, 0, 0, 0, 2 },
22185 { 0, 0, 0, 0, 0, 0, 4, -8, 0, 0, 0, 0, 0, -2 },
22186 { 0, 0, 0, 0, 0, 0, 4, -5, 0, 0, 0, 0, 0, 0 },
22187 { 0, 0, 0, 0, 0, 0, 3, -3, 0, 2, 0, 0, 0, 2 },
22188 { 0, 0, 0, 0, 0, 0, 3, -1, 0, 0, 0, 0, 0, 0 },
22189 { 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0 },
22190 { 0, 0, 0, 0, 0, 0, 1, -1, 0, 0, 0, 0, 0, -2 },
22191 { 0, 0, 0, 0, 0, 0, 0, 7,-12, 0, 0, 0, 0, -2 },
22192 { 0, 0, 0, 0, 0, 0, 0, 6, -9, 0, 0, 0, 0, -2 },
22193
22194 /* 631-640 */
22195 { 0, 0, 0, 0, 0, 0, 0, 6, -8, 1, 5, 0, 0, 2 },
22196 { 0, 0, 0, 0, 0, 0, 0, 6, -4, 0, 0, 0, 0, 2 },
22197 { 0, 0, 0, 0, 0, 0, 0, 6,-10, 0, 0, 0, 0, 0 },
22198 { 0, 0, 0, 0, 0, 0, 0, 5, 0, -4, 0, 0, 0, 2 },
22199 { 0, 0, 0, 0, 0, 0, 0, 5, -9, 0, 0, 0, 0, -1 },
22200 { 0, 0, 0, 0, 0, 0, 0, 5, -8, 3, 0, 0, 0, 2 },
22201 { 0, 0, 0, 0, 0, 0, 0, 5, -7, 0, 0, 0, 0, -2 },
22202 { 0, 0, 0, 0, 0, 0, 0, 5, -6, 0, 0, 0, 0, 0 },
22203 { 0, 0, 0, 0, 0, 0, 0, 5,-16, 4, 5, 0, 0, -2 },
22204 { 0, 0, 0, 0, 0, 0, 0, 5,-13, 0, 0, 0, 0, -2 },
22205
22206 /* 641-650 */
22207 { 0, 0, 0, 0, 0, 0, 0, 3, 0, -5, 0, 0, 0, -2 },
22208 { 0, 0, 0, 0, 0, 0, 0, 3, -9, 0, 0, 0, 0, -2 },
22209 { 0, 0, 0, 0, 0, 0, 0, 3, -7, 0, 0, 0, 0, -2 },
22210 { 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 2 },
22211 { 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, -3, 0, 0, 0 },
22212 { 0, 0, 0, 0, 0, 0, 0, 2, -8, 1, 5, 0, 0, -2 },
22213 { 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, -5, 0, 0, 0 },
22214 { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 2 },
22215 { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -3, 0, 0, 0 },
22216 { 0, 0, 0, 0, 0, 0, 0, 1, 0, -3, 5, 0, 0, 0 },
22217
22218 /* 651-NFPL */
22219 { 0, 0, 0, 0, 0, 0, 0, 1, -3, 0, 0, 0, 0, 0 },
22220 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -6, 3, 0, -2 },
22221 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -2, 0, 0, 0 },
22222 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 },
22223 { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2 },
22224 { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 }
22225 };
22226
22227 /**
22228 *
22229 * Time scale transformation: Terrestrial Time, TT, to International
22230 * Atomic Time, TAI.
22231 *
22232 * <p>This function is derived from the International Astronomical Union's
22233 * SOFA (Standards of Fundamental Astronomy) software collection.
22234 *
22235 *<p>Status: canonical.
22236 *
22237 *<!-- Given: -->
22238 * @param tt1 double TT as a 2-part Julian Date
22239 * @param tt2 double TT as a 2-part Julian Date
22240 *
22241 *<!-- Returned:-->
22242 * @return TAI as a 2-part Julian Date
22243 *
22244 * Returned (function value):
22245 * int status: 0 = OK
22246 *
22247 * Note:
22248 *
22249 * tt1+tt2 is Julian Date, apportioned in any convenient way between
22250 * the two arguments, for example where tt1 is the Julian Day Number
22251 * and tt2 is the fraction of a day. The returned tai1,tai2 follow
22252 * suit.
22253 *
22254 *<p>References:
22255 *
22256 * McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
22257 * IERS Technical Note No. 32, BKG (2004)
22258 *
22259 * Explanatory Supplement to the Astronomical Almanac,
22260 * P. Kenneth Seidelmann (ed), University Science Books (1992)
22261 *
22262 *@version 2010 May 13
22263 *
22264 *@since SOFA release 2010-12-01
22265 *
22266 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
22267 */
22268 public static JulianDate jauTttai(double tt1, double tt2)
22269 {
22270 double tai1, tai2;
22271 /* TT minus TAI (days). */
22272 final double dtat = TTMTAI / 86400.0;
22273
22274
22275 /* Result, safeguarding precision. */
22276 if ( tt1 > tt2 ) {
22277 tai1 = tt1;
22278 tai2 = tt2 - dtat;
22279 } else {
22280 tai1 = tt1 - dtat;
22281 tai2 = tt2;
22282 }
22283
22284 return new JulianDate(tai1, tai2);
22285
22286 };
22287
22288 /**
22289 *
22290 * Time scale transformation: Terrestrial Time, TT, to Geocentric
22291 * Coordinate Time, TCG.
22292 *
22293 * <p>This function is derived from the International Astronomical Union's
22294 * SOFA (Standards of Fundamental Astronomy) software collection.
22295 *
22296 *<p>Status: canonical.
22297 *
22298 *<!-- Given: -->
22299 * @param tt1 double TT as a 2-part Julian Date
22300 * @param tt2 double TT as a 2-part Julian Date
22301 *
22302 *<!-- Returned:-->
22303 * @return TCG as a 2-part Julian Date
22304 *
22305 * Returned (function value):
22306 * int status: 0 = OK
22307 *
22308 * Note:
22309 *
22310 * tt1+tt2 is Julian Date, apportioned in any convenient way between
22311 * the two arguments, for example where tt1 is the Julian Day Number
22312 * and tt2 is the fraction of a day. The returned tcg1,tcg2 follow
22313 * suit.
22314 *
22315 *<p>References:
22316 *
22317 * McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
22318 * IERS Technical Note No. 32, BKG (2004)
22319 *
22320 * IAU 2000 Resolution B1.9
22321 *
22322 *@version 2010 May 13
22323 *
22324 *@since SOFA release 2010-12-01
22325 *
22326 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
22327 */
22328 public static JulianDate jauTttcg(double tt1, double tt2)
22329
22330 {
22331 double tcg1, tcg2;
22332
22333 /* 1977 Jan 1 00:00:32.184 TT, as MJD */
22334 final double t77t = DJM77 + TTMTAI/DAYSEC;
22335
22336 /* TT to TCG rate */
22337 final double elgg = ELG/(1.0-ELG);
22338
22339
22340 /* Result, safeguarding precision. */
22341 if ( tt1 > tt2 ) {
22342 tcg1 = tt1;
22343 tcg2 = tt2 + ( ( tt1 - DJM0 ) + ( tt2 - t77t ) ) * elgg;
22344 } else {
22345 tcg1 = tt1 + ( ( tt2 - DJM0 ) + ( tt1 - t77t ) ) * elgg;
22346 tcg2 = tt2;
22347 }
22348
22349 return new JulianDate(tcg1, tcg2);
22350
22351 };
22352
22353 /**
22354 *
22355 * Time scale transformation: Terrestrial Time, TT, to Barycentric
22356 * Dynamical Time, TDB.
22357 *
22358 * <p>This function is derived from the International Astronomical Union's
22359 * SOFA (Standards of Fundamental Astronomy) software collection.
22360 *
22361 *<p>Status: canonical.
22362 *
22363 *<!-- Given: -->
22364 * @param tt1 double TT as a 2-part Julian Date
22365 * @param tt2 double TT as a 2-part Julian Date
22366 * @param dtr double TDB-TT in seconds
22367 *
22368 *<!-- Returned:-->
22369 * @return TDB as a 2-part Julian Date
22370 *
22371 * Returned (function value):
22372 * int status: 0 = OK
22373 *
22374 *<p>Notes:
22375 *
22376 * 1 tt1+tt2 is Julian Date, apportioned in any convenient way between
22377 * the two arguments, for example where tt1 is the Julian Day Number
22378 * and tt2 is the fraction of a day. The returned tdb1,tdb2 follow
22379 * suit.
22380 *
22381 * 2 The argument dtr represents the quasi-periodic component of the
22382 * GR transformation between TT and TCB. It is dependent upon the
22383 * adopted solar-system ephemeris, and can be obtained by numerical
22384 * integration, by interrogating a precomputed time ephemeris or by
22385 * evaluating a model such as that implemented in the SOFA function
22386 * jauDtdb. The quantity is dominated by an annual term of 1.7 ms
22387 * amplitude.
22388 *
22389 * 3 TDB is essentially the same as Teph, the time argument for the JPL
22390 * solar system ephemerides.
22391 *
22392 *<p>References:
22393 *
22394 * McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
22395 * IERS Technical Note No. 32, BKG (2004)
22396 *
22397 * IAU 2006 Resolution 3
22398 *
22399 *@version 2010 May 13
22400 *
22401 *@since SOFA release 2010-12-01
22402 *
22403 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
22404 */
22405 public static JulianDate jauTttdb(double tt1, double tt2, double dtr)
22406 {
22407
22408 double tdb1, tdb2;
22409 double dtrd;
22410
22411
22412 /* Result, safeguarding precision. */
22413 dtrd = dtr / DAYSEC;
22414 if ( tt1 > tt2 ) {
22415 tdb1 = tt1;
22416 tdb2 = tt2 + dtrd;
22417 } else {
22418 tdb1 = tt1 + dtrd;
22419 tdb2 = tt2;
22420 }
22421
22422 return new JulianDate(tdb1, tdb2);
22423
22424 };
22425
22426 /**
22427 *
22428 * Time scale transformation: Terrestrial Time, TT, to Universal Time,
22429 * UT1.
22430 *
22431 * <p>This function is derived from the International Astronomical Union's
22432 * SOFA (Standards of Fundamental Astronomy) software collection.
22433 *
22434 *<p>Status: canonical.
22435 *
22436 *<!-- Given: -->
22437 * @param tt1 double TT as a 2-part Julian Date
22438 * @param tt2 double TT as a 2-part Julian Date
22439 * @param dt double TT-UT1 in seconds
22440 *
22441 *<!-- Returned:-->
22442 * @return UT1 as a 2-part Julian Date
22443 *
22444 * Returned (function value):
22445 * int status: 0 = OK
22446 *
22447 *<p>Notes:
22448 *
22449 * 1 tt1+tt2 is Julian Date, apportioned in any convenient way between
22450 * the two arguments, for example where tt1 is the Julian Day Number
22451 * and tt2 is the fraction of a day. The returned ut11,ut12 follow
22452 * suit.
22453 *
22454 * 2 The argument dt is classical Delta T.
22455 *
22456 * Reference:
22457 *
22458 * Explanatory Supplement to the Astronomical Almanac,
22459 * P. Kenneth Seidelmann (ed), University Science Books (1992)
22460 *
22461 *@version 2010 May 16
22462 *
22463 *@since SOFA release 2010-12-01
22464 *
22465 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
22466 */
22467 public static JulianDate jauTtut1(double tt1, double tt2, double dt)
22468
22469 {
22470
22471 double ut11, ut12;
22472 double dtd;
22473
22474
22475 /* Result, safeguarding precision. */
22476 dtd = dt / DAYSEC;
22477 if ( tt1 > tt2 ) {
22478 ut11 = tt1;
22479 ut12 = tt2 - dtd;
22480 } else {
22481 ut11 = tt1 - dtd;
22482 ut12 = tt2;
22483 }
22484
22485 return new JulianDate(ut11, ut12);
22486 };
22487
22488 /**
22489 *
22490 * Time scale transformation: Universal Time, UT1, to International
22491 * Atomic Time, TAI.
22492 *
22493 * <p>This function is derived from the International Astronomical Union's
22494 * SOFA (Standards of Fundamental Astronomy) software collection.
22495 *
22496 *<p>Status: canonical.
22497 *
22498 *<!-- Given: -->
22499 * @param ut11 double UT1 as a 2-part Julian Date
22500 * @param ut12 double UT1 as a 2-part Julian Date
22501 * @param dta double UT1-TAI in seconds
22502 *
22503 *<!-- Returned:-->
22504 * @return TAI as a 2-part Julian Date
22505 *
22506 * Returned (function value):
22507 * int status: 0 = OK
22508 *
22509 *<p>Notes:
22510 *
22511 * 1 ut11+ut12 is Julian Date, apportioned in any convenient way
22512 * between the two arguments, for example where ut11 is the Julian
22513 * Day Number and ut12 is the fraction of a day. The returned
22514 * TAI1,TAI2 follow suit.
22515 *
22516 * 2 The argument dta, i.e. UT1-TAI, is an observed quantity, and is
22517 * available from IERS tabulations.
22518 *
22519 * Reference:
22520 *
22521 * Explanatory Supplement to the Astronomical Almanac,
22522 * P. Kenneth Seidelmann (ed), University Science Books (1992)
22523 *
22524 *@version 2010 May 16
22525 *
22526 *@since SOFA release 2010-12-01
22527 *
22528 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
22529 */
22530 public static JulianDate jauUt1tai(double ut11, double ut12, double dta )
22531
22532 {
22533 double tai1, tai2;
22534 double dtad;
22535
22536
22537 /* Result, safeguarding precision. */
22538 dtad = dta / DAYSEC;
22539 if ( ut11 > ut12 ) {
22540 tai1 = ut11;
22541 tai2 = ut12 - dtad;
22542 } else {
22543 tai1 = ut11 - dtad;
22544 tai2 = ut12;
22545 }
22546 return new JulianDate(tai1, tai2);
22547
22548 };
22549
22550 /**
22551 *
22552 * Time scale transformation: Universal Time, UT1, to Terrestrial
22553 * Time, TT.
22554 *
22555 * <p>This function is derived from the International Astronomical Union's
22556 * SOFA (Standards of Fundamental Astronomy) software collection.
22557 *
22558 *<p>Status: canonical.
22559 *
22560 *<!-- Given: -->
22561 * @param ut11 double UT1 as a 2-part Julian Date
22562 * @param ut12 double UT1 as a 2-part Julian Date
22563 * @param dt double TT-UT1 in seconds
22564 *
22565 *<!-- Returned:-->
22566 * @return TAI as a 2-part Julian Date
22567 *
22568 * Returned (function value):
22569 * int status: 0 = OK
22570 *
22571 *<p>Notes:
22572 *
22573 * 1 ut11+ut12 is Julian Date, apportioned in any convenient way
22574 * between the two arguments, for example where ut11 is the Julian
22575 * Day Number and ut12 is the fraction of a day. The returned
22576 * tt1,tt2 follow suit.
22577 *
22578 * 2 The argument dt is classical Delta T.
22579 *
22580 * Reference:
22581 *
22582 * Explanatory Supplement to the Astronomical Almanac,
22583 * P. Kenneth Seidelmann (ed), University Science Books (1992)
22584 *
22585 *@version 2010 May 16
22586 *
22587 *@since SOFA release 2010-12-01
22588 *
22589 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
22590 */
22591 public static JulianDate jauUt1tt(double ut11, double ut12, double dt)
22592 {
22593
22594 double tt1, tt2;
22595 double dtd;
22596
22597
22598 /* Result, safeguarding precision. */
22599 dtd = dt / DAYSEC;
22600 if ( ut11 > ut12 ) {
22601 tt1 = ut11;
22602 tt2 = ut12 + dtd;
22603 } else {
22604 tt1 = ut11 + dtd;
22605 tt2 = ut12;
22606 }
22607
22608 return new JulianDate(tt1, tt2);
22609
22610 };
22611
22612 /**
22613 *
22614 * Time scale transformation: Universal Time, UT1, to Coordinated
22615 * Universal Time, UTC.
22616 *
22617 * <p>This function is derived from the International Astronomical Union's
22618 * SOFA (Standards of Fundamental Astronomy) software collection.
22619 *
22620 *<p>Status: canonical.
22621 *
22622 *<!-- Given: -->
22623 * @param ut11 double UT1 as a 2-part Julian Date (Note 1)
22624 * @param ut12 double UT1 as a 2-part Julian Date (Note 1)
22625 * @param dut1 double Delta UT1: UT1-UTC in seconds (Note 2)
22626 *
22627 *<!-- Returned:-->
22628 * @return JulianDate UTC as a 2-part quasi Julian Date (Notes 3,4)
22629 *
22630 * Returned (function value):
22631 * int status: +1 = dubious year (Note 5)
22632 * 0 = OK
22633 * -1 = unacceptable date
22634 *
22635 *<p>Notes:
22636 *<ol>
22637 * <li> ut11+ut12 is Julian Date, apportioned in any convenient way
22638 * between the two arguments, for example where ut11 is the Julian
22639 * Day Number and ut12 is the fraction of a day. The returned utc1
22640 * and utc2 form an analogous pair, except that a special convention
22641 * is used, to deal with the problem of leap seconds - see Note 3.
22642 *
22643 * <li> Delta UT1 can be obtained from tabulations provided by the
22644 * International Earth Rotation and Reference Systems Service. The
22645 * value changes abruptly by 1s at a leap second; however, close to
22646 * a leap second the algorithm used here is tolerant of the "wrong"
22647 * choice of value being made.
22648 *
22649 * <li> JD cannot unambiguously represent UTC during a leap second unless
22650 * special measures are taken. The convention in the present
22651 * function is that the returned quasi JD day UTC1+UTC2 represents
22652 * UTC days whether the length is 86399, 86400 or 86401 SI seconds.
22653 *
22654 * <li> The function jauD2dtf can be used to transform the UTC quasi-JD
22655 * into calendar date and clock time, including UTC leap second
22656 * handling.
22657 *
22658 * <li> The warning status "dubious year" flags UTCs that predate the
22659 * introduction of the time scale and that are too far in the future
22660 * to be trusted. See jauDat for further details.
22661 *</ol>
22662 * Called:
22663 * <ul>
22664 * <li>{@link #jauJd2cal} JD to Gregorian calendar
22665 * <li>{@link #jauDat} delta(AT) = TAI-UTC
22666 * <li>{@link #jauCal2jd} Gregorian calendar to JD
22667 *</ul>
22668 *<p>References:
22669 *
22670 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
22671 * IERS Technical Note No. 32, BKG (2004)
22672 *
22673 * <p>Explanatory Supplement to the Astronomical Almanac,
22674 * P. Kenneth Seidelmann (ed), University Science Books (1992)
22675 *
22676 *@version 2010 May 16
22677 *
22678 *@since SOFA release 2010-12-01
22679 *
22680 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
22681 * @throws JSOFAIllegalParameter
22682 * @throws JSOFAInternalError an internal error has occured
22683 */
22684 public static JulianDate jauUt1utc(double ut11, double ut12, double dut1) throws JSOFAIllegalParameter, JSOFAInternalError
22685
22686 {
22687
22688 double utc1, utc2;
22689 boolean big1;
22690 int i;
22691 double duts, u1, u2, d1, dats1, d2, fd, dats2, ddats, us1, us2, du;
22692
22693
22694 /* UT1-UTC in seconds. */
22695 duts = dut1;
22696
22697 /* Put the two parts of the UT1 into big-first order. */
22698 big1 = ( ut11 >= ut12 );
22699 if ( big1 ) {
22700 u1 = ut11;
22701 u2 = ut12;
22702 } else {
22703 u1 = ut12;
22704 u2 = ut11;
22705 }
22706
22707 /* See if the UT1 can possibly be in a leap-second day. */
22708 d1 = u1;
22709 dats1 = 0;
22710 for ( i = -1; i <= 3; i++ ) {
22711 d2 = u2 + (double) i;
22712 Calendar dt = jauJd2cal(d1, d2 );
22713 dats2 = jauDat(dt.iy, dt.im, dt.id, 0.0);
22714 if ( i == - 1 ) dats1 = dats2;
22715 ddats = dats2 - dats1;
22716 if ( abs(ddats) >= 0.5 ) {
22717
22718 /* Yes, leap second nearby: ensure UT1-UTC is "before" value. */
22719 if ( ddats * duts >= 0 ) duts -= ddats;
22720
22721 /* UT1 for the start of the UTC day that ends in a leap. */
22722 JulianDate jd = jauCal2jd(dt.iy, dt.im, dt.id );
22723 d1 = jd.djm0; d2 = jd.djm1;
22724 us1 = d1;
22725 us2 = d2 - 1.0 + duts/DAYSEC;
22726
22727 /* Is the UT1 after this point? */
22728 du = u1 - us1;
22729 du += u2 - us2;
22730 if ( du > 0 ) {
22731
22732 /* Yes: fraction of the current UTC day that has elapsed. */
22733 fd = du * DAYSEC / ( DAYSEC + ddats );
22734
22735 /* Ramp UT1-UTC to bring about SOFA's JD(UTC) convention. */
22736 duts += ddats * ( fd <= 1.0 ? fd : 1.0 );
22737 }
22738
22739 /* Done. */
22740 break;
22741 }
22742 dats1 = dats2;
22743 }
22744
22745 /* Subtract the (possibly adjusted) UT1-UTC from UT1 to give UTC. */
22746 u2 -= duts / DAYSEC;
22747
22748 /* Result, safeguarding precision. */
22749 if ( big1 ) {
22750 utc1 = u1;
22751 utc2 = u2;
22752 } else {
22753 utc1 = u2;
22754 utc2 = u1;
22755 }
22756
22757 /* FIXME Status. */
22758 return new JulianDate(utc1, utc2);
22759
22760 };
22761
22762 /**
22763 *
22764 * Time scale transformation: Coordinated Universal Time, UTC, to
22765 * International Atomic Time, TAI.
22766 *
22767 * <p>This function is derived from the International Astronomical Union's
22768 * SOFA (Standards of Fundamental Astronomy) software collection.
22769 *
22770 *<p>Status: canonical.
22771 *
22772 *<!-- Given: -->
22773 * @param utc1 double UTC as a 2-part quasi Julian Date (Notes 1-4)
22774 * @param utc2 double UTC as a 2-part quasi Julian Date (Notes 1-4)
22775 *
22776 *<!-- Returned:-->
22777 * @return JulianDate TAI as a 2-part Julian Date (Note 5)
22778 *
22779 * Returned (function value):
22780 * int status: +1 = dubious year (Note 3)
22781 * 0 = OK
22782 * -1 = unacceptable date
22783 *
22784 *<p>Notes:
22785 *<ol>
22786 * <li> utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any
22787 * convenient way between the two arguments, for example where utc1
22788 * is the Julian Day Number and utc2 is the fraction of a day.
22789 *
22790 * <li> JD cannot unambiguously represent UTC during a leap second unless
22791 * special measures are taken. The convention in the present
22792 * function is that the JD day represents UTC days whether the
22793 * length is 86399, 86400 or 86401 SI seconds.
22794 *
22795 * <li> The warning status "dubious year" flags UTCs that predate the
22796 * introduction of the time scale and that are too far in the future
22797 * to be trusted. See jauDat for further details.
22798 *
22799 * <li> The function jauDtf2d converts from calendar date and time of day
22800 * into 2-part Julian Date, and in the case of UTC implements the
22801 * leap-second-ambiguity convention described above.
22802 *
22803 * <li> The returned TAI1,TAI2 are such that their sum is the TAI Julian
22804 * Date.
22805 *</ol>
22806 * Called:<ul>
22807 * <li>{@link #jauJd2cal} JD to Gregorian calendar
22808 * <li>{@link #jauDat} delta(AT) = TAI-UTC
22809 * <li>{@link #jauCal2jd} Gregorian calendar to JD
22810 *</ul>
22811 *<p>References:
22812 *
22813 * McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
22814 * IERS Technical Note No. 32, BKG (2004)
22815 *
22816 * Explanatory Supplement to the Astronomical Almanac,
22817 * P. Kenneth Seidelmann (ed), University Science Books (1992)
22818 *
22819 *@version 2010 September 10
22820 *
22821 *@since SOFA release 2010-12-01
22822 *
22823 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
22824 * @throws JSOFAInternalError an internal error has occured
22825 * @throws JSOFAIllegalParameter
22826 *
22827 */
22828 public static JulianDate jauUtctai(double utc1, double utc2) throws JSOFAIllegalParameter, JSOFAInternalError
22829
22830 {
22831 double tai1, tai2;
22832 boolean big1;
22833 double u1, u2, dats, datst, ddat, a2, fd;
22834
22835
22836 /* Put the two parts of the UTC into big-first order. */
22837 big1 = ( utc1 >= utc2 );
22838 if ( big1 ) {
22839 u1 = utc1;
22840 u2 = utc2;
22841 } else {
22842 u1 = utc2;
22843 u2 = utc1;
22844 }
22845
22846 /* Get TAI-UTC now. */
22847 Calendar dt = jauJd2cal(u1, u2 );
22848 dats = jauDat(dt.iy, dt.im, dt.id, dt.fd);
22849 // if ( js < 0 ) return -1;
22850 fd = dt.fd;
22851 /* Get TAI-UTC tomorrow. */
22852 Calendar dtt = jauJd2cal(u1+1.5, u2-fd );
22853 datst = jauDat(dtt.iy, dtt.im, dtt.id, dtt.fd);
22854 // if ( js < 0 ) return -1;
22855
22856 /* If today ends in a leap second, scale the fraction into SI days. */
22857 ddat = datst - dats;
22858 if ( abs(ddat) > 0.5 ) fd += fd * ddat / DAYSEC;
22859
22860 /* Today's calendar date to 2-part JD. */
22861 JulianDate jd = jauCal2jd(dt.iy, dt.im, dt.id ) ;
22862
22863 /* Assemble the TAI result, preserving the UTC split and order. */
22864 a2 = jd.djm0 - u1;
22865 a2 += jd.djm1;
22866 a2 += fd + dats / DAYSEC;
22867 if ( big1 ) {
22868 tai1 = u1;
22869 tai2 = a2;
22870 } else {
22871 tai1 = a2;
22872 tai2 = u1;
22873 }
22874
22875 /* FIXME Status. */
22876 return new JulianDate(tai1, tai2);
22877
22878 };
22879
22880 /**
22881 *
22882 * Time scale transformation: Coordinated Universal Time, UTC, to
22883 * Universal Time, UT1.
22884 *
22885 * <p>This function is derived from the International Astronomical Union's
22886 * SOFA (Standards of Fundamental Astronomy) software collection.
22887 *
22888 *<p>Status: canonical.
22889 *
22890 *<!-- Given: -->
22891 * @param utc1 double UTC as a 2-part quasi Julian Date (Notes 1-4)
22892 * @param utc2 double UTC as a 2-part quasi Julian Date (Notes 1-4)
22893 * @param dut1 double Delta UT1 = UT1-UTC in seconds (Note 5)
22894 *
22895 *<!-- Returned:-->
22896 * @return UT1 as a 2-part Julian Date (Note 6)
22897 *
22898 * Returned (function value):
22899 * int status: +1 = dubious year (Note 7)
22900 * 0 = OK
22901 * -1 = unacceptable date
22902 *
22903 *<p>Notes:
22904 *<ol>
22905 * <li> utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any
22906 * convenient way between the two arguments, for example where utc1
22907 * is the Julian Day Number and utc2 is the fraction of a day.
22908 *
22909 * <li> JD cannot unambiguously represent UTC during a leap second unless
22910 * special measures are taken. The convention in the present
22911 * function is that the JD day represents UTC days whether the
22912 * length is 86399, 86400 or 86401 SI seconds.
22913 *
22914 * <li> The warning status "dubious year" flags UTCs that predate the
22915 * introduction of the time scale and that are too far in the future
22916 * to be trusted. See jauDat for further details.
22917 *
22918 * <li> The function jauDtf2d converts from calendar date and time of
22919 * day into 2-part Julian Date, and in the case of UTC implements
22920 * the leap-second-ambiguity convention described above.
22921 *
22922 * <li> Delta UT1 can be obtained from tabulations provided by the
22923 * International Earth Rotation and Reference Systems Service. It
22924 * It is the caller's responsibility to supply a DUT argument
22925 * containing the UT1-UTC value that matches the given UTC.
22926 *
22927 * <li> The returned ut11,ut12 are such that their sum is the UT1 Julian
22928 * Date.
22929 *
22930 * <li> The warning status "dubious year" flags UTCs that predate the
22931 * introduction of the time scale and that are too far in the future
22932 * to be trusted. See jauDat for further details.
22933 *</ol>
22934 *<p>References:
22935 *
22936 * McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
22937 * IERS Technical Note No. 32, BKG (2004)
22938 *
22939 * Explanatory Supplement to the Astronomical Almanac,
22940 * P. Kenneth Seidelmann (ed), University Science Books (1992)
22941 *
22942 * Called:<ul>
22943 * <li>{@link #jauJd2cal} JD to Gregorian calendar
22944 * <li>{@link #jauDat} delta(AT) = TAI-UTC
22945 * <li>{@link #jauUtctai} UTC to TAI
22946 * <li>{@link #jauTaiut1} TAI to UT1
22947 *</ul>
22948 *@version 2010 May 16
22949 *
22950 *@since SOFA release 2010-12-01
22951 *
22952 * <!-- Copyright (C) 2010 IAU SOFA Board. See notes at end. -->
22953 * @throws JSOFAInternalError an internal error has occured
22954 * @throws JSOFAIllegalParameter
22955 */
22956 public static JulianDate jauUtcut1(double utc1, double utc2, double dut1) throws JSOFAIllegalParameter, JSOFAInternalError
22957 {
22958
22959
22960 double dta;
22961 /* Look up TAI-UTC. */
22962 Calendar dt = jauJd2cal(utc1, utc2) ;
22963 double dat = jauDat ( dt.iy, dt.im, dt.id, 0.0 );
22964
22965
22966 /* Form UT1-TAI. */
22967 dta = dut1 - dat;
22968
22969 /* UTC to TAI to UT1. */
22970 JulianDate tai = jauUtctai(utc1, utc2);
22971 return jauTaiut1(tai.djm0, tai.djm1, dta) ;
22972
22973 };
22974
22975
22976 public static CelestialIntermediatePole jauXy06(double date1, double date2)
22977 /**
22978 * X,Y coordinates of celestial intermediate pole from series based
22979 * on IAU 2006 precession and IAU 2000A nutation.
22980 *
22981 *<p>This function is derived from the International Astronomical Union's
22982 * SOFA (Standards Of Fundamental Astronomy) software collection.
22983 *
22984 *<p>Status: canonical model.
22985 *
22986 *<!-- Given: -->
22987 * @param date1 double TT as a 2-part Julian Date (Note 1)
22988 * @param date2 double TT as a 2-part Julian Date (Note 1)
22989 *
22990 *<!-- Returned: -->
22991 * @return CIP X,Y coordinates (Note 2)
22992 *
22993 * <p>Notes:
22994 * <ol>
22995 *
22996 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
22997 * convenient way between the two arguments. For example,
22998 * JD(TT)=2450123.7 could be expressed in any of these ways,
22999 * among others:
23000 *<pre>
23001 * date1 date2
23002 *
23003 * 2450123.7 0.0 (JD method)
23004 * 2451545.0 -1421.3 (J2000 method)
23005 * 2400000.5 50123.2 (MJD method)
23006 * 2450123.5 0.2 (date & time method)
23007 *</pre>
23008 * The JD method is the most natural and convenient to use in
23009 * cases where the loss of several decimal digits of resolution
23010 * is acceptable. The J2000 method is best matched to the way
23011 * the argument is handled internally and will deliver the
23012 * optimum resolution. The MJD method and the date & time methods
23013 * are both good compromises between resolution and convenience.
23014 *
23015 * <li> The X,Y coordinates are those of the unit vector towards the
23016 * celestial intermediate pole. They represent the combined effects
23017 * of frame bias, precession and nutation.
23018 *
23019 * <li> The fundamental arguments used are as adopted in IERS Conventions
23020 * (2003) and are from Simon et al. (1994) and Souchay et al.
23021 * (1999).
23022 *
23023 * <li> This is an alternative to the angles-based method, via the JSOFA
23024 * function jauFw2xy and as used in jauXys06a for example. The two
23025 * methods agree at the 1 microarcsecond level (at present), a
23026 * negligible amount compared with the intrinsic accuracy of the
23027 * models. However, it would be unwise to mix the two methods
23028 * (angles-based and series-based) in a single application.
23029 *</ol>
23030 *<p>Called:<ul>
23031 * <li>{@link #jauFal03} mean anomaly of the Moon
23032 * <li>{@link #jauFalp03} mean anomaly of the Sun
23033 * <li>{@link #jauFaf03} mean argument of the latitude of the Moon
23034 * <li>{@link #jauFad03} mean elongation of the Moon from the Sun
23035 * <li>{@link #jauFaom03} mean longitude of the Moon's ascending node
23036 * <li>{@link #jauFame03} mean longitude of Mercury
23037 * <li>{@link #jauFave03} mean longitude of Venus
23038 * <li>{@link #jauFae03} mean longitude of Earth
23039 * <li>{@link #jauFama03} mean longitude of Mars
23040 * <li>{@link #jauFaju03} mean longitude of Jupiter
23041 * <li>{@link #jauFasa03} mean longitude of Saturn
23042 * <li>{@link #jauFaur03} mean longitude of Uranus
23043 * <li>{@link #jauFane03} mean longitude of Neptune
23044 * <li>{@link #jauFapa03} general accumulated precession in longitude
23045 * </ul>
23046 *<p>References:
23047 *
23048 * <p>Capitaine, N., Wallace, P.T. & Chapront, J., 2003,
23049 * Astron.Astrophys., 412, 567
23050 *
23051 * <p>Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855
23052 *
23053 * <p>McCarthy, D. D., Petit, G. (eds.), 2004, IERS Conventions (2003),
23054 * IERS Technical Note No. 32, BKG
23055 *
23056 * Simon, J.L., Bretagnon, P., Chapront, J., Chapront-Touze, M.,
23057 * Francou, G. & Laskar, J., Astron.Astrophys., 1994, 282, 663
23058 *
23059 * Souchay, J., Loysel, B., Kinoshita, H., Folgueira, M., 1999,
23060 * Astron.Astrophys.Supp.Ser. 135, 111
23061 *
23062 * <p>Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981
23063 *
23064 *@version 2009 October 16
23065 *
23066 * @since Release 20101201
23067 *
23068 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
23069 */
23070 {
23071
23072 /* Maximum power of T in the polynomials for X and Y */
23073 final int MAXPT = (5);
23074
23075 /* Polynomial coefficients (arcsec, X then Y). */
23076 final double xyp[][] = {
23077
23078 { -0.016617,
23079 2004.191898,
23080 -0.4297829,
23081 -0.19861834,
23082 0.000007578,
23083 0.0000059285
23084 },
23085 { -0.006951,
23086 -0.025896,
23087 -22.4072747,
23088 0.00190059,
23089 0.001112526,
23090 0.0000001358
23091 }
23092 };
23093
23094 /* N.B mfals defined as class static (outside this method) to avoid problems with 65535 byte limit for methods */
23095 /* Number of frequencies: luni-solar */
23096 final int NFLS = mfals.length;
23097
23098 /* Number of frequencies: planetary */
23099 final int NFPL =mfapl.length ;
23100
23101 /* Pointers into amplitudes array, one pointer per frequency */
23102 final int nc[] = {
23103
23104 /* 1-100 */
23105 1, 21, 37, 51, 65, 79, 91, 103, 115, 127,
23106 139, 151, 163, 172, 184, 196, 207, 219, 231, 240,
23107 252, 261, 273, 285, 297, 309, 318, 327, 339, 351,
23108 363, 372, 384, 396, 405, 415, 423, 435, 444, 452,
23109 460, 467, 474, 482, 490, 498, 506, 513, 521, 528,
23110 536, 543, 551, 559, 566, 574, 582, 590, 597, 605,
23111 613, 620, 628, 636, 644, 651, 658, 666, 674, 680,
23112 687, 695, 702, 710, 717, 725, 732, 739, 746, 753,
23113 760, 767, 774, 782, 790, 798, 805, 812, 819, 826,
23114 833, 840, 846, 853, 860, 867, 874, 881, 888, 895,
23115
23116 /* 101-200 */
23117 901, 908, 914, 921, 928, 934, 941, 948, 955, 962,
23118 969, 976, 982, 989, 996, 1003, 1010, 1017, 1024, 1031,
23119 1037, 1043, 1050, 1057, 1064, 1071, 1078, 1084, 1091, 1098,
23120 1104, 1112, 1118, 1124, 1131, 1138, 1145, 1151, 1157, 1164,
23121 1171, 1178, 1185, 1192, 1199, 1205, 1212, 1218, 1226, 1232,
23122 1239, 1245, 1252, 1259, 1266, 1272, 1278, 1284, 1292, 1298,
23123 1304, 1310, 1316, 1323, 1329, 1335, 1341, 1347, 1353, 1359,
23124 1365, 1371, 1377, 1383, 1389, 1396, 1402, 1408, 1414, 1420,
23125 1426, 1434, 1440, 1446, 1452, 1459, 1465, 1471, 1477, 1482,
23126 1488, 1493, 1499, 1504, 1509, 1514, 1520, 1527, 1532, 1538,
23127
23128 /* 201-300 */
23129 1543, 1548, 1553, 1558, 1564, 1569, 1574, 1579, 1584, 1589,
23130 1594, 1596, 1598, 1600, 1602, 1605, 1608, 1610, 1612, 1617,
23131 1619, 1623, 1625, 1627, 1629, 1632, 1634, 1640, 1642, 1644,
23132 1646, 1648, 1650, 1652, 1654, 1658, 1660, 1662, 1664, 1668,
23133 1670, 1672, 1673, 1675, 1679, 1681, 1683, 1684, 1686, 1688,
23134 1690, 1693, 1695, 1697, 1701, 1703, 1705, 1707, 1709, 1711,
23135 1712, 1715, 1717, 1721, 1723, 1725, 1727, 1729, 1731, 1733,
23136 1735, 1737, 1739, 1741, 1743, 1745, 1747, 1749, 1751, 1753,
23137 1755, 1757, 1759, 1761, 1762, 1764, 1766, 1768, 1769, 1771,
23138 1773, 1775, 1777, 1779, 1781, 1783, 1785, 1787, 1788, 1790,
23139
23140 /* 301-400 */
23141 1792, 1794, 1796, 1798, 1800, 1802, 1804, 1806, 1807, 1809,
23142 1811, 1815, 1817, 1819, 1821, 1823, 1825, 1827, 1829, 1831,
23143 1833, 1835, 1837, 1839, 1840, 1842, 1844, 1848, 1850, 1852,
23144 1854, 1856, 1858, 1859, 1860, 1862, 1864, 1866, 1868, 1869,
23145 1871, 1873, 1875, 1877, 1879, 1881, 1883, 1885, 1887, 1889,
23146 1891, 1892, 1896, 1898, 1900, 1901, 1903, 1905, 1907, 1909,
23147 1910, 1911, 1913, 1915, 1919, 1921, 1923, 1927, 1929, 1931,
23148 1933, 1935, 1937, 1939, 1943, 1945, 1947, 1948, 1949, 1951,
23149 1953, 1955, 1957, 1958, 1960, 1962, 1964, 1966, 1968, 1970,
23150 1971, 1973, 1974, 1975, 1977, 1979, 1980, 1981, 1982, 1984,
23151
23152 /* 401-500 */
23153 1986, 1988, 1990, 1992, 1994, 1995, 1997, 1999, 2001, 2003,
23154 2005, 2007, 2008, 2009, 2011, 2013, 2015, 2017, 2019, 2021,
23155 2023, 2024, 2025, 2027, 2029, 2031, 2033, 2035, 2037, 2041,
23156 2043, 2045, 2046, 2047, 2049, 2051, 2053, 2055, 2056, 2057,
23157 2059, 2061, 2063, 2065, 2067, 2069, 2070, 2071, 2072, 2074,
23158 2076, 2078, 2080, 2082, 2084, 2086, 2088, 2090, 2092, 2094,
23159 2095, 2096, 2097, 2099, 2101, 2105, 2106, 2107, 2108, 2109,
23160 2110, 2111, 2113, 2115, 2119, 2121, 2123, 2125, 2127, 2129,
23161 2131, 2133, 2135, 2136, 2137, 2139, 2141, 2143, 2145, 2147,
23162 2149, 2151, 2153, 2155, 2157, 2159, 2161, 2163, 2165, 2167,
23163
23164 /* 501-600 */
23165 2169, 2171, 2173, 2175, 2177, 2179, 2181, 2183, 2185, 2186,
23166 2187, 2188, 2192, 2193, 2195, 2197, 2199, 2201, 2203, 2205,
23167 2207, 2209, 2211, 2213, 2217, 2219, 2221, 2223, 2225, 2227,
23168 2229, 2231, 2233, 2234, 2235, 2236, 2237, 2238, 2239, 2240,
23169 2241, 2244, 2246, 2248, 2250, 2252, 2254, 2256, 2258, 2260,
23170 2262, 2264, 2266, 2268, 2270, 2272, 2274, 2276, 2278, 2280,
23171 2282, 2284, 2286, 2288, 2290, 2292, 2294, 2296, 2298, 2300,
23172 2302, 2303, 2304, 2305, 2306, 2307, 2309, 2311, 2313, 2315,
23173 2317, 2319, 2321, 2323, 2325, 2327, 2329, 2331, 2333, 2335,
23174 2337, 2341, 2343, 2345, 2347, 2349, 2351, 2352, 2355, 2356,
23175
23176 /* 601-700 */
23177 2357, 2358, 2359, 2361, 2363, 2364, 2365, 2366, 2367, 2368,
23178 2369, 2370, 2371, 2372, 2373, 2374, 2376, 2378, 2380, 2382,
23179 2384, 2385, 2386, 2387, 2388, 2389, 2390, 2391, 2392, 2393,
23180 2394, 2395, 2396, 2397, 2398, 2399, 2400, 2401, 2402, 2403,
23181 2404, 2405, 2406, 2407, 2408, 2409, 2410, 2411, 2412, 2413,
23182 2414, 2415, 2417, 2418, 2430, 2438, 2445, 2453, 2460, 2468,
23183 2474, 2480, 2488, 2496, 2504, 2512, 2520, 2527, 2535, 2543,
23184 2550, 2558, 2566, 2574, 2580, 2588, 2596, 2604, 2612, 2619,
23185 2627, 2634, 2642, 2648, 2656, 2664, 2671, 2679, 2685, 2693,
23186 2701, 2709, 2717, 2725, 2733, 2739, 2747, 2753, 2761, 2769,
23187
23188 /* 701-800 */
23189 2777, 2785, 2793, 2801, 2809, 2817, 2825, 2833, 2841, 2848,
23190 2856, 2864, 2872, 2878, 2884, 2892, 2898, 2906, 2914, 2922,
23191 2930, 2938, 2944, 2952, 2958, 2966, 2974, 2982, 2988, 2996,
23192 3001, 3009, 3017, 3025, 3032, 3039, 3045, 3052, 3059, 3067,
23193 3069, 3076, 3083, 3090, 3098, 3105, 3109, 3111, 3113, 3120,
23194 3124, 3128, 3132, 3136, 3140, 3144, 3146, 3150, 3158, 3161,
23195 3165, 3166, 3168, 3172, 3176, 3180, 3182, 3185, 3189, 3193,
23196 3194, 3197, 3200, 3204, 3208, 3212, 3216, 3219, 3221, 3222,
23197 3226, 3230, 3234, 3238, 3242, 3243, 3247, 3251, 3254, 3258,
23198 3262, 3266, 3270, 3274, 3275, 3279, 3283, 3287, 3289, 3293,
23199
23200 /* 801-900 */
23201 3296, 3300, 3303, 3307, 3311, 3315, 3319, 3321, 3324, 3327,
23202 3330, 3334, 3338, 3340, 3342, 3346, 3350, 3354, 3358, 3361,
23203 3365, 3369, 3373, 3377, 3381, 3385, 3389, 3393, 3394, 3398,
23204 3402, 3406, 3410, 3413, 3417, 3421, 3425, 3429, 3433, 3435,
23205 3439, 3443, 3446, 3450, 3453, 3457, 3458, 3461, 3464, 3468,
23206 3472, 3476, 3478, 3481, 3485, 3489, 3493, 3497, 3501, 3505,
23207 3507, 3511, 3514, 3517, 3521, 3524, 3525, 3527, 3529, 3533,
23208 3536, 3540, 3541, 3545, 3548, 3551, 3555, 3559, 3563, 3567,
23209 3569, 3570, 3574, 3576, 3578, 3582, 3586, 3590, 3593, 3596,
23210 3600, 3604, 3608, 3612, 3616, 3620, 3623, 3626, 3630, 3632,
23211
23212 /* 901-1000 */
23213 3636, 3640, 3643, 3646, 3648, 3652, 3656, 3660, 3664, 3667,
23214 3669, 3671, 3675, 3679, 3683, 3687, 3689, 3693, 3694, 3695,
23215 3699, 3703, 3705, 3707, 3710, 3713, 3717, 3721, 3725, 3729,
23216 3733, 3736, 3740, 3744, 3748, 3752, 3754, 3757, 3759, 3763,
23217 3767, 3770, 3773, 3777, 3779, 3783, 3786, 3790, 3794, 3798,
23218 3801, 3805, 3809, 3813, 3817, 3821, 3825, 3827, 3831, 3835,
23219 3836, 3837, 3840, 3844, 3848, 3852, 3856, 3859, 3863, 3867,
23220 3869, 3871, 3875, 3879, 3883, 3887, 3890, 3894, 3898, 3901,
23221 3905, 3909, 3913, 3917, 3921, 3922, 3923, 3924, 3926, 3930,
23222 3932, 3936, 3938, 3940, 3944, 3948, 3952, 3956, 3959, 3963,
23223
23224 /* 1001-1100 */
23225 3965, 3969, 3973, 3977, 3979, 3981, 3982, 3986, 3989, 3993,
23226 3997, 4001, 4004, 4006, 4009, 4012, 4016, 4020, 4024, 4026,
23227 4028, 4032, 4036, 4040, 4044, 4046, 4050, 4054, 4058, 4060,
23228 4062, 4063, 4064, 4068, 4071, 4075, 4077, 4081, 4083, 4087,
23229 4089, 4091, 4095, 4099, 4101, 4103, 4105, 4107, 4111, 4115,
23230 4119, 4123, 4127, 4129, 4131, 4135, 4139, 4141, 4143, 4145,
23231 4149, 4153, 4157, 4161, 4165, 4169, 4173, 4177, 4180, 4183,
23232 4187, 4191, 4195, 4198, 4201, 4205, 4209, 4212, 4213, 4216,
23233 4217, 4221, 4223, 4226, 4230, 4234, 4236, 4240, 4244, 4248,
23234 4252, 4256, 4258, 4262, 4264, 4266, 4268, 4270, 4272, 4276,
23235
23236 /* 1101-1200 */
23237 4279, 4283, 4285, 4287, 4289, 4293, 4295, 4299, 4300, 4301,
23238 4305, 4309, 4313, 4317, 4319, 4323, 4325, 4329, 4331, 4333,
23239 4335, 4337, 4341, 4345, 4349, 4351, 4353, 4357, 4361, 4365,
23240 4367, 4369, 4373, 4377, 4381, 4383, 4387, 4389, 4391, 4395,
23241 4399, 4403, 4407, 4411, 4413, 4414, 4415, 4418, 4419, 4421,
23242 4423, 4427, 4429, 4431, 4433, 4435, 4437, 4439, 4443, 4446,
23243 4450, 4452, 4456, 4458, 4460, 4462, 4466, 4469, 4473, 4477,
23244 4481, 4483, 4487, 4489, 4491, 4493, 4497, 4499, 4501, 4504,
23245 4506, 4510, 4513, 4514, 4515, 4518, 4521, 4522, 4525, 4526,
23246 4527, 4530, 4533, 4534, 4537, 4541, 4542, 4543, 4544, 4545,
23247
23248 /* 1201-1300 */
23249 4546, 4547, 4550, 4553, 4554, 4555, 4558, 4561, 4564, 4567,
23250 4568, 4571, 4574, 4575, 4578, 4581, 4582, 4585, 4586, 4588,
23251 4590, 4592, 4596, 4598, 4602, 4604, 4608, 4612, 4613, 4616,
23252 4619, 4622, 4623, 4624, 4625, 4626, 4629, 4632, 4633, 4636,
23253 4639, 4640, 4641, 4642, 4643, 4644, 4645, 4648, 4649, 4650,
23254 4651, 4652, 4653, 4656, 4657, 4660, 4661, 4664, 4667, 4670,
23255 4671, 4674, 4675, 4676, 4677, 4678, 4681, 4682, 4683, 4684,
23256 4687, 4688, 4689, 4692, 4693, 4696, 4697, 4700, 4701, 4702,
23257 4703, 4704, 4707, 4708, 4711, 4712, 4715, 4716, 4717, 4718,
23258 4719, 4720, 4721, 4722, 4723, 4726, 4729, 4730, 4733, 4736,
23259
23260 /* 1301-(NFLS+NFPL) */
23261 4737, 4740, 4741, 4742, 4745, 4746, 4749, 4752, 4753
23262 };
23263
23264 /* Amplitude coefficients (microarcsec); indexed using the nc array. */
23265 final double a[] = {
23266
23267 /* 1-105 */
23268 -6844318.44, 9205236.26,1328.67,1538.18, 205833.11,
23269 153041.79, -3309.73, 853.32,2037.98, -2301.27,
23270 81.46, 120.56, -20.39, -15.22, 1.73, -1.61, -0.10, 0.11,
23271 -0.02, -0.02, -523908.04, 573033.42,-544.75,-458.66,
23272 12814.01, 11714.49, 198.97,-290.91, 155.74,-143.27,
23273 -2.75, -1.03, -1.27, -1.16, 0.00, -0.01, -90552.22,
23274 97846.69, 111.23, 137.41,2187.91,2024.68, 41.44, -51.26,
23275 26.92, -24.46, -0.46, -0.28, -0.22, -0.20, 82168.76,
23276 -89618.24, -27.64, -29.05, -2004.36, -1837.32,
23277 -36.07, 48.00, -24.43, 22.41, 0.47, 0.24, 0.20, 0.18,
23278 58707.02,7387.02, 470.05,-192.40, 164.33, -1312.21,
23279 -179.73, -28.93, -17.36, -1.83, -0.50, 3.57, 0.00, 0.13,
23280 -20557.78, 22438.42, -20.84, -17.40, 501.82, 459.68,
23281 59.20, -67.30, 6.08, -5.61, -1.36, -1.19, 28288.28,
23282 -674.99, -34.69, 35.80, -15.07,-632.54, -11.19, 0.78, -8.41,
23283 0.17, 0.01, 0.07, -15406.85, 20069.50, 15.12,
23284
23285 /* 106-219 */
23286 31.80, 448.76, 344.50, -5.77, 1.41, 4.59, -5.02, 0.17,
23287 0.24, -11991.74, 12902.66, 32.46, 36.70, 288.49,
23288 268.14, 5.70, -7.06, 3.57, -3.23, -0.06, -0.04,
23289 -8584.95, -9592.72, 4.42, -13.20,-214.50, 192.06,
23290 23.87, 29.83, 2.54, 2.40, 0.60, -0.48,5095.50,
23291 -6918.22, 7.19, 3.92,-154.91,-113.94, 2.86, -1.04,
23292 -1.52, 1.73, -0.07, -0.10, -4910.93, -5331.13,
23293 0.76, 0.40,-119.21, 109.81, 2.16, 3.20, 1.46, 1.33,
23294 0.04, -0.02, -6245.02,-123.48, -6.68, -8.20, -2.76,
23295 139.64, 2.71, 0.15, 1.86,2511.85, -3323.89, 1.07,
23296 -0.90, -74.33, -56.17, 1.16, -0.01, -0.75, 0.83, -0.02,
23297 -0.04,2307.58,3143.98, -7.52, 7.50, 70.31, -51.60, 1.46,
23298 0.16, -0.69, -0.79, 0.02, -0.05,2372.58,2554.51, 5.93,
23299 -6.60, 57.12, -53.05, -0.96, -1.24, -0.71, -0.64, -0.01,
23300 -2053.16,2636.13, 5.13, 7.80, 58.94, 45.91, -0.42,
23301 -0.12, 0.61, -0.66, 0.02, 0.03, -1825.49,
23302
23303 /* 220-339 */
23304 -2423.59, 1.23, -2.00, -54.19, 40.82, -1.07, -1.02,
23305 0.54, 0.61, -0.04, 0.04,2521.07,-122.28, -5.97, 2.90,
23306 -2.73, -56.37, -0.82, 0.13, -0.75, -1534.09,1645.01,
23307 6.29, 6.80, 36.78, 34.30, 0.92, -1.25, 0.46, -0.41,
23308 -0.02, -0.01,1898.27, 47.70, -0.72, 2.50, 1.07, -42.45,
23309 -0.94, 0.02, -0.56, -1292.02, -1387.00, 0.00,
23310 0.00, -31.01, 28.89, 0.68, 0.00, 0.38, 0.35, -0.01,
23311 -0.01, -1234.96,1323.81, 5.21, 5.90, 29.60, 27.61,
23312 0.74, -1.22, 0.37, -0.33, -0.02, -0.01,1137.48,
23313 -1233.89, -0.04, -0.30, -27.59, -25.43, -0.61, 1.00,
23314 -0.34, 0.31, 0.01, 0.01,-813.13, -1075.60, 0.40,
23315 0.30, -24.05, 18.18, -0.40, -0.01, 0.24, 0.27, -0.01,
23316 0.01,1163.22, -60.90, -2.94, 1.30, -1.36, -26.01, -0.58,
23317 0.07, -0.35,1029.70, -55.55, -2.63, 1.10, -1.25, -23.02,
23318 -0.52, 0.06, -0.31,-556.26, 852.85, 3.16, -4.48, 19.06,
23319 12.44, -0.81, -0.27, 0.17, -0.21, 0.00, 0.02,-603.52,
23320
23321 /* 340-467 */
23322 -800.34, 0.44, 0.10, -17.90, 13.49, -0.08, -0.01, 0.18,
23323 0.20, -0.01, 0.01,-628.24, 684.99, -0.64, -0.50, 15.32,
23324 14.05, 3.18, -4.19, 0.19, -0.17, -0.09, -0.07,-866.48,
23325 -16.26, 0.52, -1.30, -0.36, 19.37, 0.43, -0.01, 0.26,
23326 -512.37, 695.54, -1.47, -1.40, 15.55, 11.46, -0.16, 0.03,
23327 0.15, -0.17, 0.01, 0.01, 506.65, 643.75, 2.54, -2.62,
23328 14.40, -11.33, -0.77, -0.06, -0.15, -0.16, 0.00, 0.01,
23329 664.57, 16.81, -0.40, 1.00, 0.38, -14.86, -3.71, -0.09,
23330 -0.20, 405.91, 522.11, 0.99, -1.50, 11.67, -9.08, -0.25,
23331 -0.02, -0.12, -0.13,-305.78, 326.60, 1.75, 1.90, 7.30,
23332 6.84, 0.20, -0.04, 300.99,-325.03, -0.44, -0.50, -7.27,
23333 -6.73, -1.01, 0.01, 0.00, 0.08, 0.00, 0.02, 438.51,
23334 10.47, -0.56, -0.20, 0.24, -9.81, -0.24, 0.01, -0.13,
23335 -264.02, 335.24, 0.99, 1.40, 7.49, 5.90, -0.27, -0.02,
23336 284.09, 307.03, 0.32, -0.40, 6.87, -6.35, -0.99, -0.01,
23337 -250.54, 327.11, 0.08, 0.40, 7.31, 5.60, -0.30, 230.72,
23338
23339 /* 468-595 */
23340 -304.46, 0.08, -0.10, -6.81, -5.16, 0.27, 229.78, 304.17,
23341 -0.60, 0.50, 6.80, -5.14, 0.33, 0.01, 256.30,-276.81,
23342 -0.28, -0.40, -6.19, -5.73, -0.14, 0.01,-212.82, 269.45,
23343 0.84, 1.20, 6.02, 4.76, 0.14, -0.02, 196.64, 272.05,
23344 -0.84, 0.90, 6.08, -4.40, 0.35, 0.02, 188.95, 272.22,
23345 -0.12, 0.30, 6.09, -4.22, 0.34,-292.37, -5.10, -0.32,
23346 -0.40, -0.11, 6.54, 0.14, 0.01, 161.79,-220.67, 0.24,
23347 0.10, -4.93, -3.62, -0.08, 261.54, -19.94, -0.95, 0.20,
23348 -0.45, -5.85, -0.13, 0.02, 142.16,-190.79, 0.20, 0.10,
23349 -4.27, -3.18, -0.07, 187.95, -4.11, -0.24, 0.30, -0.09,
23350 -4.20, -0.09, 0.01, 0.00, 0.00, -79.08, 167.90, 0.04,
23351 0.00, 3.75, 1.77, 121.98, 131.04, -0.08, 0.10, 2.93,
23352 -2.73, -0.06,-172.95, -8.11, -0.40, -0.20, -0.18, 3.87,
23353 0.09, 0.01,-160.15, -55.30, -14.04, 13.90, -1.23, 3.58,
23354 0.40, 0.31,-115.40, 123.20, 0.60, 0.70, 2.75, 2.58,
23355 0.08, -0.01,-168.26, -2.00, 0.20, -0.20, -0.04, 3.76,
23356
23357 /* 596-723 */
23358 0.08,-114.49, 123.20, 0.32, 0.40, 2.75, 2.56, 0.07,
23359 -0.01, 112.14, 120.70, 0.28, -0.30, 2.70, -2.51, -0.07,
23360 -0.01, 161.34, 4.03, 0.20, 0.20, 0.09, -3.61, -0.08,
23361 91.31, 126.64, -0.40, 0.40, 2.83, -2.04, -0.04, 0.01,
23362 105.29, 112.90, 0.44, -0.50, 2.52, -2.35, -0.07, -0.01,
23363 98.69,-106.20, -0.28, -0.30, -2.37, -2.21, -0.06, 0.01,
23364 86.74,-112.94, -0.08, -0.20, -2.53, -1.94, -0.05,-134.81,
23365 3.51, 0.20, -0.20, 0.08, 3.01, 0.07, 79.03, 107.31,
23366 -0.24, 0.20, 2.40, -1.77, -0.04, 0.01, 132.81, -10.77,
23367 -0.52, 0.10, -0.24, -2.97, -0.07, 0.01,-130.31, -0.90,
23368 0.04, 0.00, 0.00, 2.91, -78.56, 85.32, 0.00, 0.00,
23369 1.91, 1.76, 0.04, 0.00, 0.00, -41.53, 89.10, 0.02,
23370 0.00, 1.99, 0.93, 66.03, -71.00, -0.20, -0.20, -1.59,
23371 -1.48, -0.04, 60.50, 64.70, 0.36, -0.40, 1.45, -1.35,
23372 -0.04, -0.01, -52.27, -70.01, 0.00, 0.00, -1.57, 1.17,
23373 0.03, -52.95, 66.29, 0.32, 0.40, 1.48, 1.18, 0.04,
23374
23375 /* 724-851 */
23376 -0.01, 51.02, 67.25, 0.00, 0.00, 1.50, -1.14, -0.03,
23377 -55.66, -60.92, 0.16, -0.20, -1.36, 1.24, 0.03, -54.81,
23378 -59.20, -0.08, 0.20, -1.32, 1.23, 0.03, 51.32, -55.60,
23379 0.00, 0.00, -1.24, -1.15, -0.03, 48.29, 51.80, 0.20,
23380 -0.20, 1.16, -1.08, -0.03, -45.59, -49.00, -0.12, 0.10,
23381 -1.10, 1.02, 0.03, 40.54, -52.69, -0.04, -0.10, -1.18,
23382 -0.91, -0.02, -40.58, -49.51, -1.00, 1.00, -1.11, 0.91,
23383 0.04, 0.02, -43.76, 46.50, 0.36, 0.40, 1.04, 0.98,
23384 0.03, -0.01, 62.65, -5.00, -0.24, 0.00, -0.11, -1.40,
23385 -0.03, 0.01, -38.57, 49.59, 0.08, 0.10, 1.11, 0.86,
23386 0.02, -33.22, -44.04, 0.08, -0.10, -0.98, 0.74, 0.02,
23387 37.15, -39.90, -0.12, -0.10, -0.89, -0.83, -0.02, 36.68,
23388 -39.50, -0.04, -0.10, -0.88, -0.82, -0.02, -53.22, -3.91,
23389 -0.20, 0.00, -0.09, 1.19, 0.03, 32.43, -42.19, -0.04,
23390 -0.10, -0.94, -0.73, -0.02, -51.00, -2.30, -0.12, -0.10,
23391 0.00, 1.14, -29.53, -39.11, 0.04, 0.00, -0.87, 0.66,
23392
23393 /* 852-979 */
23394 0.02, 28.50, -38.92, -0.08, -0.10, -0.87, -0.64, -0.02,
23395 26.54, 36.95, -0.12, 0.10, 0.83, -0.59, -0.01, 26.54,
23396 34.59, 0.04, -0.10, 0.77, -0.59, -0.02, 28.35, -32.55,
23397 -0.16, 0.20, -0.73, -0.63, -0.01, -28.00, 30.40, 0.00,
23398 0.00, 0.68, 0.63, 0.01, -27.61, 29.40, 0.20, 0.20,
23399 0.66, 0.62, 0.02, 40.33, 0.40, -0.04, 0.10, 0.00,
23400 -0.90, -23.28, 31.61, -0.08, -0.10, 0.71, 0.52, 0.01,
23401 37.75, 0.80, 0.04, 0.10, 0.00, -0.84, 23.66, 25.80,
23402 0.00, 0.00, 0.58, -0.53, -0.01, 21.01, -27.91, 0.00,
23403 0.00, -0.62, -0.47, -0.01, -34.81, 2.89, 0.04, 0.00,
23404 0.00, 0.78, -23.49, -25.31, 0.00, 0.00, -0.57, 0.53,
23405 0.01, -23.47, 25.20, 0.16, 0.20, 0.56, 0.52, 0.02,
23406 19.58, 27.50, -0.12, 0.10, 0.62, -0.44, -0.01, -22.67,
23407 -24.40, -0.08, 0.10, -0.55, 0.51, 0.01, -19.97, 25.00,
23408 0.12, 0.20, 0.56, 0.45, 0.01, 21.28, -22.80, -0.08,
23409 -0.10, -0.51, -0.48, -0.01, -30.47, 0.91, 0.04, 0.00,
23410
23411 /* 980-1107 */
23412 0.00, 0.68, 18.58, 24.00, 0.04, -0.10, 0.54, -0.42,
23413 -0.01, -18.02, 24.40, -0.04, -0.10, 0.55, 0.40, 0.01,
23414 17.74, 22.50, 0.08, -0.10, 0.50, -0.40, -0.01, -19.41,
23415 20.70, 0.08, 0.10, 0.46, 0.43, 0.01, -18.64, 20.11,
23416 0.00, 0.00, 0.45, 0.42, 0.01, -16.75, 21.60, 0.04,
23417 0.10, 0.48, 0.37, 0.01, -18.42, -20.00, 0.00, 0.00,
23418 -0.45, 0.41, 0.01, -26.77, 1.41, 0.08, 0.00, 0.00,
23419 0.60, -26.17, -0.19, 0.00, 0.00, 0.00, 0.59, -15.52,
23420 20.51, 0.00, 0.00, 0.46, 0.35, 0.01, -25.42, -1.91,
23421 -0.08, 0.00, -0.04, 0.57, 0.45, -17.42, 18.10, 0.00,
23422 0.00, 0.40, 0.39, 0.01, 16.39, -17.60, -0.08, -0.10,
23423 -0.39, -0.37, -0.01, -14.37, 18.91, 0.00, 0.00, 0.42,
23424 0.32, 0.01, 23.39, -2.40, -0.12, 0.00, 0.00, -0.52,
23425 14.32, -18.50, -0.04, -0.10, -0.41, -0.32, -0.01, 15.69,
23426 17.08, 0.00, 0.00, 0.38, -0.35, -0.01, -22.99, 0.50,
23427 0.04, 0.00, 0.00, 0.51, 0.00, 0.00, 14.47, -17.60,
23428
23429 /* 1108-1235 */
23430 -0.01, 0.00, -0.39, -0.32, -13.33, 18.40, -0.04, -0.10,
23431 0.41, 0.30, 22.47, -0.60, -0.04, 0.00, 0.00, -0.50,
23432 -12.78, -17.41, 0.04, 0.00, -0.39, 0.29, 0.01, -14.10,
23433 -15.31, 0.04, 0.00, -0.34, 0.32, 0.01, 11.98, 16.21,
23434 -0.04, 0.00, 0.36, -0.27, -0.01, 19.65, -1.90, -0.08,
23435 0.00, 0.00, -0.44, 19.61, -1.50, -0.08, 0.00, 0.00,
23436 -0.44, 13.41, -14.30, -0.04, -0.10, -0.32, -0.30, -0.01,
23437 -13.29, 14.40, 0.00, 0.00, 0.32, 0.30, 0.01, 11.14,
23438 -14.40, -0.04, 0.00, -0.32, -0.25, -0.01, 12.24, -13.38,
23439 0.04, 0.00, -0.30, -0.27, -0.01, 10.07, -13.81, 0.04,
23440 0.00, -0.31, -0.23, -0.01, 10.46, 13.10, 0.08, -0.10,
23441 0.29, -0.23, -0.01, 16.55, -1.71, -0.08, 0.00, 0.00,
23442 -0.37, 9.75, -12.80, 0.00, 0.00, -0.29, -0.22, -0.01,
23443 9.11, 12.80, 0.00, 0.00, 0.29, -0.20, 0.00, 0.00,
23444 -6.44, -13.80, 0.00, 0.00, -0.31, 0.14, -9.19, -12.00,
23445 0.00, 0.00, -0.27, 0.21, -10.30, 10.90, 0.08, 0.10,
23446
23447 /* 1236-1363 */
23448 0.24, 0.23, 0.01, 14.92, -0.80, -0.04, 0.00, 0.00,
23449 -0.33, 10.02, -10.80, 0.00, 0.00, -0.24, -0.22, -0.01,
23450 -9.75, 10.40, 0.04, 0.00, 0.23, 0.22, 0.01, 9.67,
23451 -10.40, -0.04, 0.00, -0.23, -0.22, -0.01, -8.28, -11.20,
23452 0.04, 0.00, -0.25, 0.19, 13.32, -1.41, -0.08, 0.00,
23453 0.00, -0.30, 8.27, 10.50, 0.04, 0.00, 0.23, -0.19,
23454 0.00, 0.00, 13.13, 0.00, 0.00, 0.00, 0.00, -0.29,
23455 -12.93, 0.70, 0.04, 0.00, 0.00, 0.29, 7.91, -10.20,
23456 0.00, 0.00, -0.23, -0.18, -7.84, -10.00, -0.04, 0.00,
23457 -0.22, 0.18, 7.44, 9.60, 0.00, 0.00, 0.21, -0.17,
23458 -7.64, 9.40, 0.08, 0.10, 0.21, 0.17, 0.01, -11.38,
23459 0.60, 0.04, 0.00, 0.00, 0.25, -7.48, 8.30, 0.00,
23460 0.00, 0.19, 0.17, -10.98, -0.20, 0.00, 0.00, 0.00,
23461 0.25, 10.98, 0.20, 0.00, 0.00, 0.00, -0.25, 7.40,
23462 -7.90, -0.04, 0.00, -0.18, -0.17, -6.09, 8.40, -0.04,
23463 0.00, 0.19, 0.14, -6.94, -7.49, 0.00, 0.00, -0.17,
23464
23465 /* 1364-1491 */
23466 0.16, 6.92, 7.50, 0.04, 0.00, 0.17, -0.15, 6.20,
23467 8.09, 0.00, 0.00, 0.18, -0.14, -6.12, 7.80, 0.04,
23468 0.00, 0.17, 0.14, 5.85, -7.50, 0.00, 0.00, -0.17,
23469 -0.13, -6.48, 6.90, 0.08, 0.10, 0.15, 0.14, 0.01,
23470 6.32, 6.90, 0.00, 0.00, 0.15, -0.14, 5.61, -7.20,
23471 0.00, 0.00, -0.16, -0.13, 9.07, 0.00, 0.00, 0.00,
23472 0.00, -0.20, 5.25, 6.90, 0.00, 0.00, 0.15, -0.12,
23473 -8.47, -0.40, 0.00, 0.00, 0.00, 0.19, 6.32, -5.39,
23474 -1.11, 1.10, -0.12, -0.14, 0.02, 0.02, 5.73, -6.10,
23475 -0.04, 0.00, -0.14, -0.13, 4.70, 6.60, -0.04, 0.00,
23476 0.15, -0.11, -4.90, -6.40, 0.00, 0.00, -0.14, 0.11,
23477 -5.33, 5.60, 0.04, 0.10, 0.13, 0.12, 0.01, -4.81,
23478 6.00, 0.04, 0.00, 0.13, 0.11, 5.13, 5.50, 0.04,
23479 0.00, 0.12, -0.11, 4.50, 5.90, 0.00, 0.00, 0.13,
23480 -0.10, -4.22, 6.10, 0.00, 0.00, 0.14, -4.53, 5.70,
23481 0.00, 0.00, 0.13, 0.10, 4.18, 5.70, 0.00, 0.00,
23482
23483 /* 1492-1619 */
23484 0.13, -4.75, -5.19, 0.00, 0.00, -0.12, 0.11, -4.06,
23485 5.60, 0.00, 0.00, 0.13, -3.98, 5.60, -0.04, 0.00,
23486 0.13, 4.02, -5.40, 0.00, 0.00, -0.12, 4.49, -4.90,
23487 -0.04, 0.00, -0.11, -0.10, -3.62, -5.40, -0.16, 0.20,
23488 -0.12, 0.00, 0.01, 4.38, 4.80, 0.00, 0.00, 0.11,
23489 -6.40, -0.10, 0.00, 0.00, 0.00, 0.14, -3.98, 5.00,
23490 0.04, 0.00, 0.11, -3.82, -5.00, 0.00, 0.00, -0.11,
23491 -3.71, 5.07, 0.00, 0.00, 0.11, 4.14, 4.40, 0.00,
23492 0.00, 0.10, -6.01, -0.50, -0.04, 0.00, 0.00, 0.13,
23493 -4.04, 4.39, 0.00, 0.00, 0.10, 3.45, -4.72, 0.00,
23494 0.00, -0.11, 3.31, 4.71, 0.00, 0.00, 0.11, 3.26,
23495 -4.50, 0.00, 0.00, -0.10, -3.26, -4.50, 0.00, 0.00,
23496 -0.10, -3.34, -4.40, 0.00, 0.00, -0.10, -3.74, -4.00,
23497 3.70, 4.00, 3.34, -4.30, 3.30, -4.30, -3.66, 3.90,
23498 0.04, 3.66, 3.90, 0.04, -3.62, -3.90, -3.61, 3.90,
23499 -0.20, 5.30, 0.00, 0.00, 0.12, 3.06, 4.30, 3.30,
23500
23501 /* 1620-1747 */
23502 4.00, 0.40, 0.20, 3.10, 4.10, -3.06, 3.90, -3.30,
23503 -3.60, -3.30, 3.36, 0.01, 3.14, 3.40, -4.57, -0.20,
23504 0.00, 0.00, 0.00, 0.10, -2.70, -3.60, 2.94, -3.20,
23505 -2.90, 3.20, 2.47, -3.40, 2.55, -3.30, 2.80, -3.08,
23506 2.51, 3.30, -4.10, 0.30, -0.12, -0.10, 4.10, 0.20,
23507 -2.74, 3.00, 2.46, 3.23, -3.66, 1.20, -0.20, 0.20,
23508 3.74, -0.40, -2.51, -2.80, -3.74, 2.27, -2.90, 0.00,
23509 0.00, -2.50, 2.70, -2.51, 2.60, -3.50, 0.20, 3.38,
23510 -2.22, -2.50, 3.26, -0.40, 1.95, -2.60, 3.22, -0.40,
23511 -0.04, -1.79, -2.60, 1.91, 2.50, 0.74, 3.05, -0.04,
23512 0.08, 2.11, -2.30, -2.11, 2.20, -1.87, -2.40, 2.03,
23513 -2.20, -2.03, 2.20, 2.98, 0.00, 0.00, 2.98, -1.71,
23514 2.40, 2.94, -0.10, -0.12, 0.10, 1.67, 2.40, -1.79,
23515 2.30, -1.79, 2.20, -1.67, 2.20, 1.79, -2.00, 1.87,
23516 -1.90, 1.63, -2.10, -1.59, 2.10, 1.55, -2.10, -1.55,
23517 2.10, -2.59, -0.20, -1.75, -1.90, -1.75, 1.90, -1.83,
23518
23519 /* 1748-1875 */
23520 -1.80, 1.51, 2.00, -1.51, -2.00, 1.71, 1.80, 1.31,
23521 2.10, -1.43, 2.00, 1.43, 2.00, -2.43, -1.51, 1.90,
23522 -1.47, 1.90, 2.39, 0.20, -2.39, 1.39, 1.90, 1.39,
23523 -1.80, 1.47, -1.60, 1.47, -1.60, 1.43, -1.50, -1.31,
23524 1.60, 1.27, -1.60, -1.27, 1.60, 1.27, -1.60, 2.03,
23525 1.35, 1.50, -1.39, -1.40, 1.95, -0.20, -1.27, 1.49,
23526 1.19, 1.50, 1.27, 1.40, 1.15, 1.50, 1.87, -0.10,
23527 -1.12, -1.50, 1.87, -1.11, -1.50, -1.11, -1.50, 0.00,
23528 0.00, 1.19, 1.40, 1.27, -1.30, -1.27, -1.30, -1.15,
23529 1.40, -1.23, 1.30, -1.23, -1.30, 1.22, -1.29, 1.07,
23530 -1.40, 1.75, -0.20, -1.03, -1.40, -1.07, 1.20, -1.03,
23531 1.15, 1.07, 1.10, 1.51, -1.03, 1.10, 1.03, -1.10,
23532 0.00, 0.00, -1.03, -1.10, 0.91, -1.20, -0.88, -1.20,
23533 -0.88, 1.20, -0.95, 1.10, -0.95, -1.10, 1.43, -1.39,
23534 0.95, -1.00, -0.95, 1.00, -0.80, 1.10, 0.91, -1.00,
23535 -1.35, 0.88, 1.00, -0.83, 1.00, -0.91, 0.90, 0.91,
23536
23537 /* 1876-2003 */
23538 0.90, 0.88, -0.90, -0.76, -1.00, -0.76, 1.00, 0.76,
23539 1.00, -0.72, 1.00, 0.84, -0.90, 0.84, 0.90, 1.23,
23540 0.00, 0.00, -0.52, -1.10, -0.68, 1.00, 1.19, -0.20,
23541 1.19, 0.76, 0.90, 1.15, -0.10, 1.15, -0.10, 0.72,
23542 -0.90, -1.15, -1.15, 0.68, 0.90, -0.68, 0.90, -1.11,
23543 0.00, 0.00, 0.20, 0.79, 0.80, -1.11, -0.10, 0.00,
23544 0.00, -0.48, -1.00, -0.76, -0.80, -0.72, -0.80, -1.07,
23545 -0.10, 0.64, 0.80, -0.64, -0.80, 0.64, 0.80, 0.40,
23546 0.60, 0.52, -0.50, -0.60, -0.80, -0.71, 0.70, -0.99,
23547 0.99, 0.56, 0.80, -0.56, 0.80, 0.68, -0.70, 0.68,
23548 0.70, -0.95, -0.64, 0.70, 0.64, 0.70, -0.60, 0.70,
23549 -0.60, -0.70, -0.91, -0.10, -0.51, 0.76, -0.91, -0.56,
23550 0.70, 0.88, 0.88, -0.63, -0.60, 0.55, -0.60, -0.80,
23551 0.80, -0.80, -0.52, 0.60, 0.52, 0.60, 0.52, -0.60,
23552 -0.48, 0.60, 0.48, 0.60, 0.48, 0.60, -0.76, 0.44,
23553 -0.60, 0.52, -0.50, -0.52, 0.50, 0.40, 0.60, -0.40,
23554
23555 /* 2004-2131 */
23556 -0.60, 0.40, -0.60, 0.72, -0.72, -0.51, -0.50, -0.48,
23557 0.50, 0.48, -0.50, -0.48, 0.50, -0.48, 0.50, 0.48,
23558 -0.50, -0.48, -0.50, -0.68, -0.68, 0.44, 0.50, -0.64,
23559 -0.10, -0.64, -0.10, -0.40, 0.50, 0.40, 0.50, 0.40,
23560 0.50, 0.00, 0.00, -0.40, -0.50, -0.36, -0.50, 0.36,
23561 -0.50, 0.60, -0.60, 0.40, -0.40, 0.40, 0.40, -0.40,
23562 0.40, -0.40, 0.40, -0.56, -0.56, 0.36, -0.40, -0.36,
23563 0.40, 0.36, -0.40, -0.36, -0.40, 0.36, 0.40, 0.36,
23564 0.40, -0.52, 0.52, 0.52, 0.32, 0.40, -0.32, 0.40,
23565 -0.32, 0.40, -0.32, 0.40, 0.32, -0.40, -0.32, -0.40,
23566 0.32, -0.40, 0.28, -0.40, -0.28, 0.40, 0.28, -0.40,
23567 0.28, 0.40, 0.48, -0.48, 0.48, 0.36, -0.30, -0.36,
23568 -0.30, 0.00, 0.00, 0.20, 0.40, -0.44, 0.44, -0.44,
23569 -0.44, -0.44, -0.44, 0.32, -0.30, 0.32, 0.30, 0.24,
23570 0.30, -0.12, -0.10, -0.28, 0.30, 0.28, 0.30, 0.28,
23571 0.30, 0.28, -0.30, 0.28, -0.30, 0.28, -0.30, 0.28,
23572
23573 /* 2132-2259 */
23574 0.30, -0.28, 0.30, 0.40, 0.40, -0.24, 0.30, 0.24,
23575 -0.30, 0.24, -0.30, -0.24, -0.30, 0.24, 0.30, 0.24,
23576 -0.30, -0.24, 0.30, 0.24, -0.30, -0.24, -0.30, 0.24,
23577 -0.30, 0.24, 0.30, -0.24, 0.30, -0.24, 0.30, 0.20,
23578 -0.30, 0.20, -0.30, 0.20, -0.30, 0.20, 0.30, 0.20,
23579 -0.30, 0.20, -0.30, 0.20, 0.30, 0.20, 0.30, -0.20,
23580 -0.30, 0.20, -0.30, 0.20, -0.30, -0.36, -0.36, -0.36,
23581 -0.04, 0.30, 0.12, -0.10, -0.32, -0.24, 0.20, 0.24,
23582 0.20, 0.20, -0.20, -0.20, -0.20, -0.20, -0.20, 0.20,
23583 0.20, 0.20, -0.20, 0.20, 0.20, 0.20, 0.20, -0.20,
23584 -0.20, 0.00, 0.00, -0.20, -0.20, -0.20, 0.20, -0.20,
23585 0.20, 0.20, -0.20, -0.20, -0.20, 0.20, 0.20, 0.20,
23586 0.20, 0.20, -0.20, 0.20, -0.20, 0.28, 0.28, 0.28,
23587 0.28, 0.28, 0.28, -0.28, 0.28, 0.12, 0.00, 0.24,
23588 0.16, -0.20, 0.16, -0.20, 0.16, -0.20, 0.16, 0.20,
23589 -0.16, 0.20, 0.16, 0.20, -0.16, 0.20, -0.16, 0.20,
23590
23591 /* 2260-2387 */
23592 -0.16, 0.20, 0.16, -0.20, 0.16, 0.20, 0.16, -0.20,
23593 -0.16, 0.20, -0.16, -0.20, -0.16, 0.20, 0.16, 0.20,
23594 0.16, -0.20, 0.16, -0.20, 0.16, 0.20, 0.16, 0.20,
23595 0.16, 0.20, -0.16, -0.20, 0.16, 0.20, -0.16, 0.20,
23596 0.16, 0.20, -0.16, -0.20, 0.16, -0.20, 0.16, -0.20,
23597 -0.16, -0.20, 0.24, -0.24, -0.24, 0.24, 0.24, 0.12,
23598 0.20, 0.12, 0.20, -0.12, -0.20, 0.12, -0.20, 0.12,
23599 -0.20, -0.12, 0.20, -0.12, 0.20, -0.12, -0.20, 0.12,
23600 0.20, 0.12, 0.20, 0.12, -0.20, -0.12, 0.20, 0.12,
23601 -0.20, -0.12, 0.20, 0.12, 0.20, 0.00, 0.00, -0.12,
23602 0.20, -0.12, 0.20, 0.12, -0.20, -0.12, 0.20, 0.12,
23603 0.20, 0.00, -0.21, -0.20, 0.00, 0.00, 0.20, -0.20,
23604 -0.20, -0.20, 0.20, -0.16, -0.10, 0.00, 0.17, 0.16,
23605 0.16, 0.16, 0.16, -0.16, 0.16, 0.16, -0.16, 0.16,
23606 -0.16, 0.16, 0.12, 0.10, 0.12, -0.10, -0.12, 0.10,
23607 -0.12, 0.10, 0.12, -0.10, -0.12, 0.12, -0.12, 0.12,
23608
23609 /* 2388-2515 */
23610 -0.12, 0.12, -0.12, -0.12, -0.12, -0.12, -0.12, -0.12,
23611 -0.12, 0.12, 0.12, 0.12, 0.12, -0.12, -0.12, 0.12,
23612 0.12, 0.12, -0.12, 0.12, -0.12, -0.12, -0.12, 0.12,
23613 -0.12, -0.12, 0.12, 0.00, 0.11, 0.11,-122.67, 164.70,
23614 203.78, 273.50, 3.58, 2.74, 6.18, -4.56, 0.00, -0.04,
23615 0.00, -0.07, 57.44, -77.10, 95.82, 128.60, -1.77, -1.28,
23616 2.85, -2.14, 82.14, 89.50, 0.00, 0.00, 2.00, -1.84,
23617 -0.04, 47.73, -64.10, 23.79, 31.90, -1.45, -1.07, 0.69,
23618 -0.53, -46.38, 50.50, 0.00, 0.00, 1.13, 1.04, 0.02,
23619 -18.38, 0.00, 63.80, 0.00, 0.00, 0.41, 0.00, -1.43,
23620 59.07, 0.00, 0.00, 0.00, 0.00, -1.32, 57.28, 0.00,
23621 0.00, 0.00, 0.00, -1.28, -48.65, 0.00, -1.15, 0.00,
23622 0.00, 1.09, 0.00, 0.03, -18.30, 24.60, -17.30, -23.20,
23623 0.56, 0.41, -0.51, 0.39, -16.91, 26.90, 8.43, 13.30,
23624 0.60, 0.38, 0.31, -0.19, 1.23, -1.70, -19.13, -25.70,
23625 -0.03, -0.03, -0.58, 0.43, -0.72, 0.90, -17.34, -23.30,
23626
23627 /* 2516-2643 */
23628 0.03, 0.02, -0.52, 0.39, -19.49, -21.30, 0.00, 0.00,
23629 -0.48, 0.44, 0.01, 20.57, -20.10, 0.64, 0.70, -0.45,
23630 -0.46, 0.00, -0.01, 4.89, 5.90, -16.55, 19.90, 0.14,
23631 -0.11, 0.44, 0.37, 18.22, 19.80, 0.00, 0.00, 0.44,
23632 -0.41, -0.01, 4.89, -5.30, -16.51, -18.00, -0.11, -0.11,
23633 -0.41, 0.37, -17.86, 0.00, 17.10, 0.00, 0.00, 0.40,
23634 0.00, -0.38, 0.32, 0.00, 24.42, 0.00, 0.00, -0.01,
23635 0.00, -0.55, -23.79, 0.00, 0.00, 0.00, 0.00, 0.53,
23636 14.72, -16.00, -0.32, 0.00, -0.36, -0.33, -0.01, 0.01,
23637 3.34, -4.50, 11.86, 15.90, -0.11, -0.07, 0.35, -0.27,
23638 -3.26, 4.40, 11.62, 15.60, 0.09, 0.07, 0.35, -0.26,
23639 -19.53, 0.00, 5.09, 0.00, 0.00, 0.44, 0.00, -0.11,
23640 -13.48, 14.70, 0.00, 0.00, 0.33, 0.30, 0.01, 10.86,
23641 -14.60, 3.18, 4.30, -0.33, -0.24, 0.09, -0.07, -11.30,
23642 -15.10, 0.00, 0.00, -0.34, 0.25, 0.01, 2.03, -2.70,
23643 10.82, 14.50, -0.07, -0.05, 0.32, -0.24, 17.46, 0.00,
23644
23645 /* 2644-2771 */
23646 0.00, 0.00, 0.00, -0.39, 16.43, 0.00, 0.52, 0.00,
23647 0.00, -0.37, 0.00, -0.01, 9.35, 0.00, 13.29, 0.00,
23648 0.00, -0.21, 0.00, -0.30, -10.42, 11.40, 0.00, 0.00,
23649 0.25, 0.23, 0.01, 0.44, 0.50, -10.38, 11.30, 0.02,
23650 -0.01, 0.25, 0.23, -14.64, 0.00, 0.00, 0.00, 0.00,
23651 0.33, 0.56, 0.80, -8.67, 11.70, 0.02, -0.01, 0.26,
23652 0.19, 13.88, 0.00, -2.47, 0.00, 0.00, -0.31, 0.00,
23653 0.06, -1.99, 2.70, 7.72, 10.30, 0.06, 0.04, 0.23,
23654 -0.17, -0.20, 0.00, 13.05, 0.00, 0.00, 0.00, 0.00,
23655 -0.29, 6.92, -9.30, 3.34, 4.50, -0.21, -0.15, 0.10,
23656 -0.07, -6.60, 0.00, 10.70, 0.00, 0.00, 0.15, 0.00,
23657 -0.24, -8.04, -8.70, 0.00, 0.00, -0.19, 0.18, -10.58,
23658 0.00, -3.10, 0.00, 0.00, 0.24, 0.00, 0.07, -7.32,
23659 8.00, -0.12, -0.10, 0.18, 0.16, 1.63, 1.70, 6.96,
23660 -7.60, 0.03, -0.04, -0.17, -0.16, -3.62, 0.00, 9.86,
23661 0.00, 0.00, 0.08, 0.00, -0.22, 0.20, -0.20, -6.88,
23662
23663 /* 2772-2899 */
23664 -7.50, 0.00, 0.00, -0.17, 0.15, -8.99, 0.00, 4.02,
23665 0.00, 0.00, 0.20, 0.00, -0.09, -1.07, 1.40, -5.69,
23666 -7.70, 0.03, 0.02, -0.17, 0.13, 6.48, -7.20, -0.48,
23667 -0.50, -0.16, -0.14, -0.01, 0.01, 5.57, -7.50, 1.07,
23668 1.40, -0.17, -0.12, 0.03, -0.02, 8.71, 0.00, 3.54,
23669 0.00, 0.00, -0.19, 0.00, -0.08, 0.40, 0.00, 9.27,
23670 0.00, 0.00, -0.01, 0.00, -0.21, -6.13, 6.70, -1.19,
23671 -1.30, 0.15, 0.14, -0.03, 0.03, 5.21, -5.70, -2.51,
23672 -2.60, -0.13, -0.12, -0.06, 0.06, 5.69, -6.20, -0.12,
23673 -0.10, -0.14, -0.13, -0.01, 2.03, -2.70, 4.53, 6.10,
23674 -0.06, -0.05, 0.14, -0.10, 5.01, 5.50, -2.51, 2.70,
23675 0.12, -0.11, 0.06, 0.06, -1.91, 2.60, -4.38, -5.90,
23676 0.06, 0.04, -0.13, 0.10, 4.65, -6.30, 0.00, 0.00,
23677 -0.14, -0.10, -5.29, 5.70, 0.00, 0.00, 0.13, 0.12,
23678 -2.23, -4.00, -4.65, 4.20, -0.09, 0.05, 0.10, 0.10,
23679 -4.53, 6.10, 0.00, 0.00, 0.14, 0.10, 2.47, 2.70,
23680
23681 /* 2900-3027 */
23682 -4.46, 4.90, 0.06, -0.06, 0.11, 0.10, -5.05, 5.50,
23683 0.84, 0.90, 0.12, 0.11, 0.02, -0.02, 4.97, -5.40,
23684 -1.71, 0.00, -0.12, -0.11, 0.00, 0.04, -0.99, -1.30,
23685 4.22, -5.70, -0.03, 0.02, -0.13, -0.09, 0.99, 1.40,
23686 4.22, -5.60, 0.03, -0.02, -0.13, -0.09, -4.69, -5.20,
23687 0.00, 0.00, -0.12, 0.10, -3.42, 0.00, 6.09, 0.00,
23688 0.00, 0.08, 0.00, -0.14, -4.65, -5.10, 0.00, 0.00,
23689 -0.11, 0.10, 0.00, 0.00, -4.53, -5.00, 0.00, 0.00,
23690 -0.11, 0.10, -2.43, -2.70, -3.82, 4.20, -0.06, 0.05,
23691 0.10, 0.09, 0.00, 0.00, -4.53, 4.90, 0.00, 0.00,
23692 0.11, 0.10, -4.49, -4.90, 0.00, 0.00, -0.11, 0.10,
23693 2.67, -2.90, -3.62, -3.90, -0.06, -0.06, -0.09, 0.08,
23694 3.94, -5.30, 0.00, 0.00, -0.12, -3.38, 3.70, -2.78,
23695 -3.10, 0.08, 0.08, -0.07, 0.06, 3.18, -3.50, -2.82,
23696 -3.10, -0.08, -0.07, -0.07, 0.06, -5.77, 0.00, 1.87,
23697 0.00, 0.00, 0.13, 0.00, -0.04, 3.54, -4.80, -0.64,
23698
23699 /* 3028-3155 */
23700 -0.90, -0.11, 0.00, -0.02, -3.50, -4.70, 0.68, -0.90,
23701 -0.11, 0.00, -0.02, 5.49, 0.00, 0.00, 0.00, 0.00,
23702 -0.12, 1.83, -2.50, 2.63, 3.50, -0.06, 0.00, 0.08,
23703 3.02, -4.10, 0.68, 0.90, -0.09, 0.00, 0.02, 0.00,
23704 0.00, 5.21, 0.00, 0.00, 0.00, 0.00, -0.12, -3.54,
23705 3.80, 2.70, 3.60, -1.35, 1.80, 0.08, 0.00, 0.04,
23706 -2.90, 3.90, 0.68, 0.90, 0.09, 0.00, 0.02, 0.80,
23707 -1.10, -2.78, -3.70, -0.02, 0.00, -0.08, 4.10, 0.00,
23708 -2.39, 0.00, 0.00, -0.09, 0.00, 0.05, -1.59, 2.10,
23709 2.27, 3.00, 0.05, 0.00, 0.07, -2.63, 3.50, -0.48,
23710 -0.60, -2.94, -3.20, -2.94, 3.20, 2.27, -3.00, -1.11,
23711 -1.50, -0.07, 0.00, -0.03, -0.56, -0.80, -2.35, 3.10,
23712 0.00, -0.60, -3.42, 1.90, -0.12, -0.10, 2.63, -2.90,
23713 2.51, 2.80, -0.64, 0.70, -0.48, -0.60, 2.19, -2.90,
23714 0.24, -0.30, 2.15, 2.90, 2.15, -2.90, 0.52, 0.70,
23715 2.07, -2.80, -3.10, 0.00, 1.79, 0.00, 0.00, 0.07,
23716
23717 /* 3156-3283 */
23718 0.00, -0.04, 0.88, 0.00, -3.46, 2.11, 2.80, -0.36,
23719 0.50, 3.54, -0.20, -3.50, -1.39, 1.50, -1.91, -2.10,
23720 -1.47, 2.00, 1.39, 1.90, 2.07, -2.30, 0.91, 1.00,
23721 1.99, -2.70, 3.30, 0.00, 0.60, -0.44, -0.70, -1.95,
23722 2.60, 2.15, -2.40, -0.60, -0.70, 3.30, 0.84, 0.00,
23723 -3.10, -3.10, 0.00, -0.72, -0.32, 0.40, -1.87, -2.50,
23724 1.87, -2.50, 0.32, 0.40, -0.24, 0.30, -1.87, -2.50,
23725 -0.24, -0.30, 1.87, -2.50, -2.70, 0.00, 1.55, 2.03,
23726 2.20, -2.98, -1.99, -2.20, 0.12, -0.10, -0.40, 0.50,
23727 1.59, 2.10, 0.00, 0.00, -1.79, 2.00, -1.03, 1.40,
23728 -1.15, -1.60, 0.32, 0.50, 1.39, -1.90, 2.35, -1.27,
23729 1.70, 0.60, 0.80, -0.32, -0.40, 1.35, -1.80, 0.44,
23730 0.00, 2.23, -0.84, 0.90, -1.27, -1.40, -1.47, 1.60,
23731 -0.28, -0.30, -0.28, 0.40, -1.27, -1.70, 0.28, -0.40,
23732 -1.43, -1.50, 0.00, 0.00, -1.27, -1.70, 2.11, -0.32,
23733 -0.40, -1.23, 1.60, 1.19, -1.30, -0.72, -0.80, 0.72,
23734
23735 /* 3284-3411 */
23736 -0.80, -1.15, -1.30, -1.35, -1.50, -1.19, -1.60, -0.12,
23737 0.20, 1.79, 0.00, -0.88, -0.28, 0.40, 1.11, 1.50,
23738 -1.83, 0.00, 0.56, -0.12, 0.10, -1.27, -1.40, 0.00,
23739 0.00, 1.15, 1.50, -0.12, 0.20, 1.11, 1.50, 0.36,
23740 -0.50, -1.07, -1.40, -1.11, 1.50, 1.67, 0.00, 0.80,
23741 -1.11, 0.00, 1.43, 1.23, -1.30, -0.24, -1.19, -1.30,
23742 -0.24, 0.20, -0.44, -0.90, -0.95, 1.10, 1.07, -1.40,
23743 1.15, -1.30, 1.03, -1.10, -0.56, -0.60, -0.68, 0.90,
23744 -0.76, -1.00, -0.24, -0.30, 0.95, -1.30, 0.56, 0.70,
23745 0.84, -1.10, -0.56, 0.00, -1.55, 0.91, -1.30, 0.28,
23746 0.30, 0.16, -0.20, 0.95, 1.30, 0.40, -0.50, -0.88,
23747 -1.20, 0.95, -1.10, -0.48, -0.50, 0.00, 0.00, -1.07,
23748 1.20, 0.44, -0.50, 0.95, 1.10, 0.00, 0.00, 0.92,
23749 -1.30, 0.95, 1.00, -0.52, 0.60, 1.59, 0.24, -0.40,
23750 0.91, 1.20, 0.84, -1.10, -0.44, -0.60, 0.84, 1.10,
23751 -0.44, 0.60, -0.44, 0.60, -0.84, -1.10, -0.80, 0.00,
23752
23753 /* 3412-3539 */
23754 1.35, 0.76, 0.20, -0.91, -1.00, 0.20, -0.30, -0.91,
23755 -1.20, -0.95, 1.00, -0.48, -0.50, 0.88, 1.00, 0.48,
23756 -0.50, -0.95, -1.10, 0.20, -0.20, -0.99, 1.10, -0.84,
23757 1.10, -0.24, -0.30, 0.20, -0.30, 0.84, 1.10, -1.39,
23758 0.00, -0.28, -0.16, 0.20, 0.84, 1.10, 0.00, 0.00,
23759 1.39, 0.00, 0.00, -0.95, 1.00, 1.35, -0.99, 0.00,
23760 0.88, -0.52, 0.00, -1.19, 0.20, 0.20, 0.76, -1.00,
23761 0.00, 0.00, 0.76, 1.00, 0.00, 0.00, 0.76, 1.00,
23762 -0.76, 1.00, 0.00, 0.00, 1.23, 0.76, 0.80, -0.32,
23763 0.40, -0.72, 0.80, -0.40, -0.40, 0.00, 0.00, -0.80,
23764 -0.90, -0.68, 0.90, -0.16, -0.20, -0.16, -0.20, 0.68,
23765 -0.90, -0.36, 0.50, -0.56, -0.80, 0.72, -0.90, 0.44,
23766 -0.60, -0.48, -0.70, -0.16, 0.00, -1.11, 0.32, 0.00,
23767 -1.07, 0.60, -0.80, -0.28, -0.40, -0.64, 0.00, 0.91,
23768 1.11, 0.64, -0.90, 0.76, -0.80, 0.00, 0.00, -0.76,
23769 -0.80, 1.03, 0.00, -0.36, -0.64, -0.70, 0.36, -0.40,
23770
23771 /* 3540-3667 */
23772 1.07, 0.36, -0.50, -0.52, -0.70, 0.60, 0.00, 0.88,
23773 0.95, 0.00, 0.48, 0.16, -0.20, 0.60, 0.80, 0.16,
23774 -0.20, -0.60, -0.80, 0.00, -1.00, 0.12, 0.20, 0.16,
23775 -0.20, 0.68, 0.70, 0.59, -0.80, -0.99, -0.56, -0.60,
23776 0.36, -0.40, -0.68, -0.70, -0.68, -0.70, -0.36, -0.50,
23777 -0.44, 0.60, 0.64, 0.70, -0.12, 0.10, -0.52, 0.60,
23778 0.36, 0.40, 0.00, 0.00, 0.95, -0.84, 0.00, 0.44,
23779 0.56, 0.60, 0.32, -0.30, 0.00, 0.00, 0.60, 0.70,
23780 0.00, 0.00, 0.60, 0.70, -0.12, -0.20, 0.52, -0.70,
23781 0.00, 0.00, 0.56, 0.70, -0.12, 0.10, -0.52, -0.70,
23782 0.00, 0.00, 0.88, -0.76, 0.00, -0.44, 0.00, 0.00,
23783 -0.52, -0.70, 0.52, -0.70, 0.36, -0.40, -0.44, -0.50,
23784 0.00, 0.00, 0.60, 0.60, 0.84, 0.00, 0.12, -0.24,
23785 0.00, 0.80, -0.56, 0.60, -0.32, -0.30, 0.48, -0.50,
23786 0.28, -0.30, -0.48, -0.50, 0.12, 0.20, 0.48, -0.60,
23787 0.48, 0.60, -0.12, 0.20, 0.24, 0.00, 0.76, -0.52,
23788
23789 /* 3668-3795 */
23790 -0.60, -0.52, 0.60, 0.48, -0.50, -0.24, -0.30, 0.12,
23791 -0.10, 0.48, 0.60, 0.52, -0.20, 0.36, 0.40, -0.44,
23792 0.50, -0.24, -0.30, -0.48, -0.60, -0.44, -0.60, -0.12,
23793 0.10, 0.76, 0.76, 0.20, -0.20, 0.48, 0.50, 0.40,
23794 -0.50, -0.24, -0.30, 0.44, -0.60, 0.44, -0.60, 0.36,
23795 0.00, -0.64, 0.72, 0.00, -0.12, 0.00, -0.10, -0.40,
23796 -0.60, -0.20, -0.20, -0.44, 0.50, -0.44, 0.50, 0.20,
23797 0.20, -0.44, -0.50, 0.20, -0.20, -0.20, 0.20, -0.44,
23798 -0.50, 0.64, 0.00, 0.32, -0.36, 0.50, -0.20, -0.30,
23799 0.12, -0.10, 0.48, 0.50, -0.12, 0.30, -0.36, -0.50,
23800 0.00, 0.00, 0.48, 0.50, -0.48, 0.50, 0.68, 0.00,
23801 -0.12, 0.56, -0.40, 0.44, -0.50, -0.12, -0.10, 0.24,
23802 0.30, -0.40, 0.40, 0.64, 0.00, -0.24, 0.64, 0.00,
23803 -0.20, 0.00, 0.00, 0.44, -0.50, 0.44, 0.50, -0.12,
23804 0.20, -0.36, -0.50, 0.12, 0.00, 0.64, -0.40, 0.50,
23805 0.00, 0.10, 0.00, 0.00, -0.40, 0.50, 0.00, 0.00,
23806
23807 /* 3796-3923 */
23808 -0.40, -0.50, 0.56, 0.00, 0.28, 0.00, 0.10, 0.36,
23809 0.50, 0.00, -0.10, 0.36, -0.50, 0.36, 0.50, 0.00,
23810 -0.10, 0.24, -0.20, -0.36, -0.40, 0.16, 0.20, 0.40,
23811 -0.40, 0.00, 0.00, -0.36, -0.50, -0.36, -0.50, -0.32,
23812 -0.50, -0.12, 0.10, 0.20, 0.20, -0.36, 0.40, -0.60,
23813 0.60, 0.28, 0.00, 0.52, 0.12, -0.10, 0.40, 0.40,
23814 0.00, -0.50, 0.20, -0.20, -0.32, 0.40, 0.16, 0.20,
23815 -0.16, 0.20, 0.32, 0.40, 0.56, 0.00, -0.12, 0.32,
23816 -0.40, -0.16, -0.20, 0.00, 0.00, 0.40, 0.40, -0.40,
23817 -0.40, -0.40, 0.40, -0.36, 0.40, 0.12, 0.10, 0.00,
23818 0.10, 0.36, 0.40, 0.00, -0.10, 0.36, 0.40, -0.36,
23819 0.40, 0.00, 0.10, 0.32, 0.00, 0.44, 0.12, 0.20,
23820 0.28, -0.40, 0.00, 0.00, 0.36, 0.40, 0.32, -0.40,
23821 -0.16, 0.12, 0.10, 0.32, -0.40, 0.20, 0.30, -0.24,
23822 0.30, 0.00, 0.10, 0.32, 0.40, 0.00, -0.10, -0.32,
23823 -0.40, -0.32, 0.40, 0.00, 0.10, -0.52, -0.52, 0.52,
23824
23825 /* 3924-4051 */
23826 0.32, -0.40, 0.00, 0.00, 0.32, 0.40, 0.32, -0.40,
23827 0.00, 0.00, -0.32, -0.40, -0.32, 0.40, 0.32, 0.40,
23828 0.00, 0.00, 0.32, 0.40, 0.00, 0.00, -0.32, -0.40,
23829 0.00, 0.00, 0.32, 0.40, 0.16, 0.20, 0.32, -0.30,
23830 -0.16, 0.00, -0.48, -0.20, 0.20, -0.28, -0.30, 0.28,
23831 -0.40, 0.00, 0.00, 0.28, -0.40, 0.00, 0.00, 0.28,
23832 -0.40, 0.00, 0.00, -0.28, -0.40, 0.28, 0.40, -0.28,
23833 -0.40, -0.48, -0.20, 0.20, 0.24, 0.30, 0.44, 0.00,
23834 0.16, 0.24, 0.30, 0.16, -0.20, 0.24, 0.30, -0.12,
23835 0.20, 0.20, 0.30, -0.16, 0.20, 0.00, 0.00, 0.44,
23836 -0.32, 0.30, 0.24, 0.00, -0.36, 0.36, 0.00, 0.24,
23837 0.12, -0.20, 0.20, 0.30, -0.12, 0.00, -0.28, 0.30,
23838 -0.24, 0.30, 0.12, 0.10, -0.28, -0.30, -0.28, 0.30,
23839 0.00, 0.00, -0.28, -0.30, 0.00, 0.00, -0.28, -0.30,
23840 0.00, 0.00, 0.28, 0.30, 0.00, 0.00, -0.28, -0.30,
23841 -0.28, 0.30, 0.00, 0.00, -0.28, -0.30, 0.00, 0.00,
23842
23843 /* 4052-4179 */
23844 0.28, 0.30, 0.00, 0.00, -0.28, 0.30, 0.28, -0.30,
23845 -0.28, 0.30, 0.40, 0.40, -0.24, 0.30, 0.00, -0.10,
23846 0.16, 0.00, 0.36, -0.20, 0.30, -0.12, -0.10, -0.24,
23847 -0.30, 0.00, 0.00, -0.24, 0.30, -0.24, 0.30, 0.00,
23848 0.00, -0.24, 0.30, -0.24, 0.30, 0.24, -0.30, 0.00,
23849 0.00, 0.24, -0.30, 0.00, 0.00, 0.24, 0.30, 0.24,
23850 -0.30, 0.24, 0.30, -0.24, 0.30, -0.24, 0.30, -0.20,
23851 0.20, -0.16, -0.20, 0.00, 0.00, -0.32, 0.20, 0.00,
23852 0.10, 0.20, -0.30, 0.20, -0.20, 0.12, 0.20, -0.16,
23853 0.20, 0.16, 0.20, 0.20, 0.30, 0.20, 0.30, 0.00,
23854 0.00, -0.20, 0.30, 0.00, 0.00, 0.20, 0.30, -0.20,
23855 -0.30, -0.20, -0.30, 0.20, -0.30, 0.00, 0.00, 0.20,
23856 0.30, 0.00, 0.00, 0.20, 0.30, 0.00, 0.00, 0.20,
23857 0.30, 0.00, 0.00, 0.20, 0.30, 0.00, 0.00, 0.20,
23858 -0.30, 0.00, 0.00, -0.20, -0.30, 0.00, 0.00, -0.20,
23859 0.30, 0.00, 0.00, -0.20, 0.30, 0.00, 0.00, 0.36,
23860
23861 /* 4180-4307 */
23862 0.00, 0.00, 0.36, 0.12, 0.10, -0.24, 0.20, 0.12,
23863 -0.20, -0.16, -0.20, -0.13, 0.10, 0.22, 0.21, 0.20,
23864 0.00, -0.28, 0.32, 0.00, -0.12, -0.20, -0.20, 0.12,
23865 -0.10, 0.12, 0.10, -0.20, 0.20, 0.00, 0.00, -0.32,
23866 0.32, 0.00, 0.00, 0.32, 0.32, 0.00, 0.00, -0.24,
23867 -0.20, 0.24, 0.20, 0.20, 0.00, -0.24, 0.00, 0.00,
23868 -0.24, -0.20, 0.00, 0.00, 0.24, 0.20, -0.24, -0.20,
23869 0.00, 0.00, -0.24, 0.20, 0.16, -0.20, 0.12, 0.10,
23870 0.20, 0.20, 0.00, -0.10, -0.12, 0.10, -0.16, -0.20,
23871 -0.12, -0.10, -0.16, 0.20, 0.20, 0.20, 0.00, 0.00,
23872 -0.20, 0.20, -0.20, 0.20, -0.20, 0.20, -0.20, 0.20,
23873 0.20, -0.20, -0.20, -0.20, 0.00, 0.00, -0.20, 0.20,
23874 0.20, 0.00, -0.20, 0.00, 0.00, -0.20, 0.20, -0.20,
23875 0.20, -0.20, -0.20, -0.20, -0.20, 0.00, 0.00, 0.20,
23876 0.20, 0.20, 0.20, 0.12, -0.20, -0.12, -0.10, 0.28,
23877 -0.28, 0.16, -0.20, 0.00, -0.10, 0.00, 0.10, -0.16,
23878
23879 /* 4308-4435 */
23880 0.20, 0.00, -0.10, -0.16, -0.20, 0.00, -0.10, 0.16,
23881 -0.20, 0.16, -0.20, 0.00, 0.00, 0.16, 0.20, -0.16,
23882 0.20, 0.00, 0.00, 0.16, 0.20, 0.16, -0.20, 0.16,
23883 -0.20, -0.16, 0.20, 0.16, -0.20, 0.00, 0.00, 0.16,
23884 0.20, 0.00, 0.00, 0.16, 0.20, 0.00, 0.00, -0.16,
23885 -0.20, 0.16, -0.20, -0.16, -0.20, 0.00, 0.00, -0.16,
23886 -0.20, 0.00, 0.00, -0.16, 0.20, 0.00, 0.00, 0.16,
23887 -0.20, 0.16, 0.20, 0.16, 0.20, 0.00, 0.00, -0.16,
23888 -0.20, 0.00, 0.00, -0.16, -0.20, 0.00, 0.00, 0.16,
23889 0.20, 0.16, 0.20, 0.00, 0.00, 0.16, 0.20, 0.16,
23890 -0.20, 0.16, 0.20, 0.00, 0.00, -0.16, 0.20, 0.00,
23891 0.10, 0.12, -0.20, 0.12, -0.20, 0.00, -0.10, 0.00,
23892 -0.10, 0.12, 0.20, 0.00, -0.10, -0.12, 0.20, -0.15,
23893 0.20, -0.24, 0.24, 0.00, 0.00, 0.24, 0.24, 0.12,
23894 -0.20, -0.12, -0.20, 0.00, 0.00, 0.12, 0.20, 0.12,
23895 -0.20, 0.12, 0.20, 0.12, 0.20, 0.12, 0.20, 0.12,
23896
23897 /* 4436-4563 */
23898 -0.20, -0.12, 0.20, 0.00, 0.00, 0.12, 0.20, 0.12,
23899 0.00, -0.20, 0.00, 0.00, -0.12, -0.20, 0.12, -0.20,
23900 0.00, 0.00, 0.12, 0.20, -0.12, 0.20, -0.12, 0.20,
23901 0.12, -0.20, 0.00, 0.00, 0.12, 0.20, 0.20, 0.00,
23902 0.12, 0.00, 0.00, -0.12, 0.20, 0.00, 0.00, -0.12,
23903 -0.20, 0.00, 0.00, -0.12, -0.20, -0.12, -0.20, 0.00,
23904 0.00, 0.12, -0.20, 0.12, -0.20, 0.12, 0.20, -0.12,
23905 -0.20, 0.00, 0.00, 0.12, -0.20, 0.12, -0.20, 0.12,
23906 0.20, 0.12, 0.00, 0.20, -0.12, -0.20, 0.00, 0.00,
23907 0.12, 0.20, -0.16, 0.00, 0.16, -0.20, 0.20, 0.00,
23908 0.00, -0.20, 0.00, 0.00, -0.20, 0.20, 0.00, 0.00,
23909 0.20, 0.20, -0.20, 0.00, 0.00, -0.20, 0.12, 0.00,
23910 -0.16, 0.20, 0.00, 0.00, 0.20, 0.12, -0.10, 0.00,
23911 0.10, 0.16, -0.16, -0.16, -0.16, -0.16, -0.16, 0.00,
23912 0.00, -0.16, 0.00, 0.00, -0.16, -0.16, -0.16, 0.00,
23913 0.00, -0.16, 0.00, 0.00, 0.16, 0.00, 0.00, 0.16,
23914
23915 /* 4564-4691 */
23916 0.00, 0.00, 0.16, 0.16, 0.00, 0.00, -0.16, 0.00,
23917 0.00, -0.16, -0.16, 0.00, 0.00, 0.16, 0.00, 0.00,
23918 -0.16, -0.16, 0.00, 0.00, -0.16, -0.16, 0.12, 0.10,
23919 0.12, -0.10, 0.12, 0.10, 0.00, 0.00, 0.12, 0.10,
23920 -0.12, 0.10, 0.00, 0.00, 0.12, 0.10, 0.12, -0.10,
23921 0.00, 0.00, -0.12, -0.10, 0.00, 0.00, 0.12, 0.10,
23922 0.12, 0.00, 0.00, 0.12, 0.00, 0.00, -0.12, 0.00,
23923 0.00, 0.12, 0.12, 0.12, 0.12, 0.12, 0.00, 0.00,
23924 0.12, 0.00, 0.00, 0.12, 0.12, 0.00, 0.00, 0.12,
23925 0.00, 0.00, 0.12, -0.12, -0.12, 0.12, 0.12, -0.12,
23926 -0.12, 0.00, 0.00, 0.12, -0.12, 0.12, 0.12, -0.12,
23927 -0.12, 0.00, 0.00, -0.12, -0.12, 0.00, 0.00, -0.12,
23928 0.12, 0.00, 0.00, 0.12, 0.00, 0.00, 0.12, 0.00,
23929 0.00, 0.12, -0.12, 0.00, 0.00, -0.12, 0.12, -0.12,
23930 -0.12, 0.12, 0.00, 0.00, 0.12, 0.12, 0.12, -0.12,
23931 0.00, 0.00, -0.12, -0.12, -0.12, 0.00, 0.00, -0.12,
23932
23933 /* 4692-NA */
23934 -0.12, 0.00, 0.00, 0.12, 0.12, 0.00, 0.00, -0.12,
23935 -0.12, -0.12, -0.12, 0.12, 0.00, 0.00, 0.12, -0.12,
23936 0.00, 0.00, -0.12, -0.12, 0.00, 0.00, 0.12, -0.12,
23937 -0.12, -0.12, -0.12, 0.12, 0.12, -0.12, -0.12, 0.00,
23938 0.00, -0.12, 0.00, 0.00, -0.12, 0.12, 0.00, 0.00,
23939 0.12, 0.00, 0.00, -0.12, -0.12, 0.00, 0.00, -0.12,
23940 -0.12, 0.12, 0.00, 0.00, 0.12, 0.12, 0.00, 0.00,
23941 0.12, 0.00, 0.00, 0.12, 0.12, 0.08, 0.00, 0.04
23942 };
23943
23944 /* Number of amplitude coefficients */
23945 final int NA = a.length;
23946
23947 /* Amplitude usage: X or Y, sin or cos, power of T. */
23948 final int jaxy[] = {0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1};
23949 final int jasc[] = {0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0};
23950 final int japt[] = {0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4};
23951
23952 /* Miscellaneous */
23953 double t, w, pt[] = new double[MAXPT+1], fa[] = new double[14], xypr[] = new double[2], xypl[] = new double[2], xyls[] = new double[2], arg,
23954 sc[] = new double[2];
23955 int jpt, i, j, jxy, ialast, ifreq, m, ia, jsc;
23956
23957 /*--------------------------------------------------------------------*/
23958
23959 /* Interval between fundamental date J2000.0 and given date (JC). */
23960 t = ((date1 - DJ00) + date2) / DJC;
23961
23962 /* Powers of T. */
23963 w = 1.0;
23964 for (jpt = 0; jpt <= MAXPT; jpt++) {
23965 pt[jpt] = w;
23966 w *= t;
23967 }
23968
23969 /* Initialize totals in X and Y: polynomial, luni-solar, planetary. */
23970 for (jxy = 0; jxy < 2; jxy++) {
23971 xypr[jxy] = 0.0;
23972 xyls[jxy] = 0.0;
23973 xypl[jxy] = 0.0;
23974 }
23975
23976 /* --------------------------------- */
23977 /* Fundamental arguments (IERS 2003) */
23978 /* --------------------------------- */
23979
23980 /* Mean anomaly of the Moon. */
23981 fa[0] = jauFal03(t);
23982
23983 /* Mean anomaly of the Sun. */
23984 fa[1] = jauFalp03(t);
23985
23986 /* Mean argument of the latitude of the Moon. */
23987 fa[2] = jauFaf03(t);
23988
23989 /* Mean elongation of the Moon from the Sun. */
23990 fa[3] = jauFad03(t);
23991
23992 /* Mean longitude of the ascending node of the Moon. */
23993 fa[4] = jauFaom03(t);
23994
23995 /* Planetary longitudes, Mercury through Neptune. */
23996 fa[5] = jauFame03(t);
23997 fa[6] = jauFave03(t);
23998 fa[7] = jauFae03(t);
23999 fa[8] = jauFama03(t);
24000 fa[9] = jauFaju03(t);
24001 fa[10] = jauFasa03(t);
24002 fa[11] = jauFaur03(t);
24003 fa[12] = jauFane03(t);
24004
24005 /* General accumulated precession in longitude. */
24006 fa[13] = jauFapa03(t);
24007
24008 /* -------------------------------------- */
24009 /* Polynomial part of precession-nutation */
24010 /* -------------------------------------- */
24011
24012 for (jxy = 0; jxy < 2; jxy++) {
24013 for (j = MAXPT; j >= 0; j--) {
24014 xypr[jxy] += xyp[jxy][j] * pt[j];
24015 }
24016 }
24017
24018 /* ---------------------------------- */
24019 /* Nutation periodic terms, planetary */
24020 /* ---------------------------------- */
24021
24022 /* Work backwards through the coefficients per frequency list. */
24023 ialast = NA;
24024 for (ifreq = NFPL-1; ifreq >= 0; ifreq--) {
24025
24026 /* Obtain the argument functions. */
24027 arg = 0.0;
24028 for (i = 0; i < 14; i++) {
24029 m = mfapl[ifreq][i];
24030 if (m != 0) arg += (double)m * fa[i];
24031 }
24032 sc[0] = sin(arg);
24033 sc[1] = cos(arg);
24034
24035 /* Work backwards through the amplitudes at this frequency. */
24036 ia = nc[ifreq+NFLS];
24037 for (i = ialast; i >= ia; i--) {
24038
24039 /* Coefficient number (0 = 1st). */
24040 j = i-ia;
24041
24042 /* X or Y. */
24043 jxy = jaxy[j];
24044
24045 /* Sin or cos. */
24046 jsc = jasc[j];
24047
24048 /* Power of T. */
24049 jpt = japt[j];
24050
24051 /* Accumulate the component. */
24052 xypl[jxy] += a[i-1] * sc[jsc] * pt[jpt];
24053 }
24054 ialast = ia-1;
24055 }
24056
24057 /* ----------------------------------- */
24058 /* Nutation periodic terms, luni-solar */
24059 /* ----------------------------------- */
24060
24061 /* Continue working backwards through the number of coefficients list. */
24062 for (ifreq = NFLS-1; ifreq >= 0; ifreq--) {
24063
24064 /* Obtain the argument functions. */
24065 arg = 0.0;
24066 for (i = 0; i < 5; i++) {
24067 m = mfals[ifreq][i];
24068 if (m != 0) arg += (double)m * fa[i];
24069 }
24070 sc[0] = sin(arg);
24071 sc[1] = cos(arg);
24072
24073 /* Work backwards through the amplitudes at this frequency. */
24074 ia = nc[ifreq];
24075 for (i = ialast; i >= ia; i--) {
24076
24077 /* Coefficient number (0 = 1st). */
24078 j = i-ia;
24079
24080 /* X or Y. */
24081 jxy = jaxy[j];
24082
24083 /* Sin or cos. */
24084 jsc = jasc[j];
24085
24086 /* Power of T. */
24087 jpt = japt[j];
24088
24089 /* Accumulate the component. */
24090 xyls[jxy] += a[i-1] * sc[jsc] * pt[jpt];
24091 }
24092 ialast = ia-1;
24093 }
24094
24095 /* ------------------------------------ */
24096 /* Results: CIP unit vector components */
24097 /* ------------------------------------ */
24098
24099 double x = DAS2R * (xypr[0] + (xyls[0] + xypl[0]) / 1e6);
24100 double y = DAS2R * (xypr[1] + (xyls[1] + xypl[1]) / 1e6);
24101
24102 return new CelestialIntermediatePole(x, y);
24103
24104 }
24105
24106
24107 /**
24108 * For a given TT date, compute the X,Y coordinates of the Celestial
24109 * Intermediate Pole and the CIO locator s, using the IAU 2000A
24110 * precession-nutation model.
24111 *
24112 *<p>This function is derived from the International Astronomical Union's
24113 * SOFA (Standards Of Fundamental Astronomy) software collection.
24114 *
24115 *<p>Status: support function.
24116 *
24117 *<!-- Given: -->
24118 * @param date1 double TT as a 2-part Julian Date (Note 1)
24119 * @param date2 double TT as a 2-part Julian Date (Note 1)
24120 *
24121 *<!-- Returned: -->
24122 * @return x double <u>returned</u> Celestial Intermediate Pole (Note 2)
24123 * y double <u>returned</u> Celestial Intermediate Pole (Note 2)
24124 * s double <u>returned</u> the CIO locator s (Note 2)
24125 *
24126 * <p>Notes:
24127 * <ol>
24128 *
24129 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
24130 * convenient way between the two arguments. For example,
24131 * JD(TT)=2450123.7 could be expressed in any of these ways,
24132 * among others:
24133 *<pre>
24134 * date1 date2
24135 *
24136 * 2450123.7 0.0 (JD method)
24137 * 2451545.0 -1421.3 (J2000 method)
24138 * 2400000.5 50123.2 (MJD method)
24139 * 2450123.5 0.2 (date & time method)
24140 *</pre>
24141 * The JD method is the most natural and convenient to use in
24142 * cases where the loss of several decimal digits of resolution
24143 * is acceptable. The J2000 method is best matched to the way
24144 * the argument is handled internally and will deliver the
24145 * optimum resolution. The MJD method and the date & time methods
24146 * are both good compromises between resolution and convenience.
24147 *
24148 * <li> The Celestial Intermediate Pole coordinates are the x,y
24149 * components of the unit vector in the Geocentric Celestial
24150 * Reference System.
24151 *
24152 * <li> The CIO locator s (in radians) positions the Celestial
24153 * Intermediate Origin on the equator of the CIP.
24154 *
24155 * <li> A faster, but slightly less accurate result (about 1 mas for
24156 * X,Y), can be obtained by using instead the jauXys00b function.
24157 *</ol>
24158 *<p>Called:<ul>
24159 * <li>{@link #jauPnm00a} classical NPB matrix, IAU 2000A
24160 * <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
24161 * <li>{@link #jauS00} the CIO locator s, given X,Y, IAU 2000A
24162 * </ul>
24163 *<p>Reference:
24164 *
24165 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
24166 * IERS Technical Note No. 32, BKG (2004)
24167 *
24168 *@version 2008 May 12
24169 *
24170 * @since Release 20101201
24171 *
24172 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
24173 */
24174 public static ICRFrame jauXys00a(double date1, double date2)
24175 {
24176
24177 /* Form the bias-precession-nutation matrix, IAU 2000A. */
24178 double rbpn[][] = jauPnm00a(date1, date2);
24179
24180 /* Extract X,Y. */
24181 CelestialIntermediatePole cip = jauBpn2xy(rbpn);
24182
24183 /* Obtain s. */
24184 double s = jauS00(date1, date2, cip.x, cip.y);
24185
24186 return new ICRFrame(cip, s);
24187
24188 }
24189
24190
24191 /**
24192 * The Celestial Intermediate Pole coordinates are the x,y
24193 * components of the unit vector in the Geocentric Celestial
24194 * Reference System.
24195 *
24196 * The CIO locator s (in radians) positions the Celestial
24197 * Intermediate Origin on the equator of the CIP.
24198
24199 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 1 Feb 2010
24200 *
24201 * @since AIDA Stage 1
24202 */
24203 public static class ICRFrame {
24204 public CelestialIntermediatePole cip;
24205 public double s;
24206 public ICRFrame(CelestialIntermediatePole cip, double s) {
24207 this.cip = cip;
24208 this.s = s;
24209 }
24210 }
24211 /**
24212 * For a given TT date, compute the X,Y coordinates of the Celestial
24213 * Intermediate Pole and the CIO locator s, using the IAU 2000B
24214 * precession-nutation model.
24215 *
24216 *<p>This function is derived from the International Astronomical Union's
24217 * SOFA (Standards Of Fundamental Astronomy) software collection.
24218 *
24219 *<p>Status: support function.
24220 *
24221 *<!-- Given: -->
24222 * @param date1 double TT as a 2-part Julian Date (Note 1)
24223 * @param date2 double TT as a 2-part Julian Date (Note 1)
24224 *
24225 *<!-- Returned: -->
24226 * @return x double <u>returned</u> Celestial Intermediate Pole (Note 2)
24227 * y double <u>returned</u> Celestial Intermediate Pole (Note 2)
24228 * s double <u>returned</u> the CIO locator s (Note 2)
24229 *
24230 * <p>Notes:
24231 * <ol>
24232 *
24233 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
24234 * convenient way between the two arguments. For example,
24235 * JD(TT)=2450123.7 could be expressed in any of these ways,
24236 * among others:
24237 *<pre>
24238 * date1 date2
24239 *
24240 * 2450123.7 0.0 (JD method)
24241 * 2451545.0 -1421.3 (J2000 method)
24242 * 2400000.5 50123.2 (MJD method)
24243 * 2450123.5 0.2 (date & time method)
24244 *</pre>
24245 * The JD method is the most natural and convenient to use in
24246 * cases where the loss of several decimal digits of resolution
24247 * is acceptable. The J2000 method is best matched to the way
24248 * the argument is handled internally and will deliver the
24249 * optimum resolution. The MJD method and the date & time methods
24250 * are both good compromises between resolution and convenience.
24251 *
24252 * <li> The Celestial Intermediate Pole coordinates are the x,y
24253 * components of the unit vector in the Geocentric Celestial
24254 * Reference System.
24255 *
24256 * <li> The CIO locator s (in radians) positions the Celestial
24257 * Intermediate Origin on the equator of the CIP.
24258 *
24259 * <li> The present function is faster, but slightly less accurate (about
24260 * 1 mas in X,Y), than the jauXys00a function.
24261 *</ol>
24262 *<p>Called:<ul>
24263 * <li>{@link #jauPnm00b} classical NPB matrix, IAU 2000B
24264 * <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
24265 * <li>{@link #jauS00} the CIO locator s, given X,Y, IAU 2000A
24266 * </ul>
24267 *<p>Reference:
24268 *
24269 * <p>McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
24270 * IERS Technical Note No. 32, BKG (2004)
24271 *
24272 *@version 2008 May 12
24273 *
24274 * @since Release 20101201
24275 *
24276 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
24277 */
24278 public static ICRFrame jauXys00b(double date1, double date2)
24279 {
24280 double rbpn[][] = new double[3][3];
24281
24282
24283 /* Form the bias-precession-nutation matrix, IAU 2000A. */
24284 rbpn = jauPnm00b(date1, date2);
24285
24286 /* Extract X,Y. */
24287 CelestialIntermediatePole cip = jauBpn2xy(rbpn);
24288
24289 /* Obtain s. */
24290 double s = jauS00(date1, date2, cip.x, cip.y);
24291
24292 return new ICRFrame(cip, s);
24293
24294 }
24295
24296
24297 /**
24298 * For a given TT date, compute the X,Y coordinates of the Celestial
24299 * Intermediate Pole and the CIO locator s, using the IAU 2006
24300 * precession and IAU 2000A nutation models.
24301 *
24302 *<p>This function is derived from the International Astronomical Union's
24303 * SOFA (Standards Of Fundamental Astronomy) software collection.
24304 *
24305 *<p>Status: support function.
24306 *
24307 *<!-- Given: -->
24308 * @param date1 double TT as a 2-part Julian Date (Note 1)
24309 * @param date2 double TT as a 2-part Julian Date (Note 1)
24310 *
24311 *<!-- Returned: -->
24312 * @return x double <u>returned</u> Celestial Intermediate Pole (Note 2)
24313 * y double <u>returned</u> Celestial Intermediate Pole (Note 2)
24314 * s double <u>returned</u> the CIO locator s (Note 2)
24315 *
24316 * <p>Notes:
24317 * <ol>
24318 *
24319 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
24320 * convenient way between the two arguments. For example,
24321 * JD(TT)=2450123.7 could be expressed in any of these ways,
24322 * among others:
24323 *<pre>
24324 * date1 date2
24325 *
24326 * 2450123.7 0.0 (JD method)
24327 * 2451545.0 -1421.3 (J2000 method)
24328 * 2400000.5 50123.2 (MJD method)
24329 * 2450123.5 0.2 (date & time method)
24330 *</pre>
24331 * The JD method is the most natural and convenient to use in
24332 * cases where the loss of several decimal digits of resolution
24333 * is acceptable. The J2000 method is best matched to the way
24334 * the argument is handled internally and will deliver the
24335 * optimum resolution. The MJD method and the date & time methods
24336 * are both good compromises between resolution and convenience.
24337 *
24338 * <li> The Celestial Intermediate Pole coordinates are the x,y components
24339 * of the unit vector in the Geocentric Celestial Reference System.
24340 *
24341 * <li> The CIO locator s (in radians) positions the Celestial
24342 * Intermediate Origin on the equator of the CIP.
24343 *
24344 * <li> Series-based solutions for generating X and Y are also available:
24345 * see Capitaine & Wallace (2006) and jauXy06.
24346 *</ol>
24347 *<p>Called:<ul>
24348 * <li>{@link #jauPnm06a} classical NPB matrix, IAU 2006/2000A
24349 * <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
24350 * <li>{@link #jauS06} the CIO locator s, given X,Y, IAU 2006
24351 * </ul>
24352 *<p>References:
24353 *
24354 * <p>Capitaine, N. & Wallace, P.T., 2006, Astron.Astrophys. 450, 855
24355 *
24356 * <p>Wallace, P.T. & Capitaine, N., 2006, Astron.Astrophys. 459, 981
24357 *
24358 *@version 2008 May 11
24359 *
24360 * @since Release 20101201
24361 *
24362 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
24363 */
24364 public static ICRFrame jauXys06a(double date1, double date2)
24365 {
24366 double rbpn[][] = new double[3][3];
24367
24368
24369 /* Form the bias-precession-nutation matrix, IAU 2000A. */
24370 rbpn = jauPnm06a(date1, date2);
24371
24372 /* Extract X,Y. */
24373 CelestialIntermediatePole cip = jauBpn2xy(rbpn);
24374
24375 /* Obtain s. */
24376 double s = jauS06(date1, date2, cip.x, cip.y);
24377
24378 return new ICRFrame(cip, s);
24379
24380 }
24381
24382
24383 /**
24384 * Zero a p-vector.
24385 *
24386 *<p>This function is derived from the International Astronomical Union's
24387 * SOFA (Standards Of Fundamental Astronomy) software collection.
24388 *
24389 *<p>Status: vector/matrix support function.
24390 *
24391 *<!-- Returned: -->
24392 * @param p double[3] <u>returned</u> p-vector
24393 *
24394 *@version 2008 May 11
24395 *
24396 * @since Release 20101201
24397 *
24398 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
24399 */
24400 public static void jauZp(double p[] )
24401 {
24402 p[0] = 0.0;
24403 p[1] = 0.0;
24404 p[2] = 0.0;
24405
24406 return;
24407
24408 }
24409
24410
24411 /**
24412 * Zero a pv-vector.
24413 *
24414 *<p>This function is derived from the International Astronomical Union's
24415 * SOFA (Standards Of Fundamental Astronomy) software collection.
24416 *
24417 *<p>Status: vector/matrix support function.
24418 *
24419 *<!-- Returned: -->
24420 * @param pv double[2][3] <u>returned</u> pv-vector
24421 *
24422 *<p>Called:<ul>
24423 * <li>{@link #jauZp} zero p-vector
24424 * </ul>
24425 *@version 2008 May 11
24426 *
24427 * @since Release 20101201
24428 *
24429 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
24430 */
24431 public static void jauZpv(double pv[][])
24432 {
24433 jauZp(pv[0]);
24434 jauZp(pv[1]);
24435
24436 return;
24437
24438 }
24439
24440
24441 /**
24442 * Initialize an r-matrix to the null matrix.
24443 *
24444 *<p>This function is derived from the International Astronomical Union's
24445 * SOFA (Standards Of Fundamental Astronomy) software collection.
24446 *
24447 *<p>Status: vector/matrix support function.
24448 *
24449 *<!-- Returned: -->
24450 * @param r double[3][3] <u>returned</u> r-matrix
24451 *
24452 *@version 2008 May 11
24453 *
24454 * @since Release 20101201
24455 *
24456 * <!-- Copyright (C) 2009 IAU SOFA Review Board. See notes at end -->
24457 */
24458 public static void jauZr(double r[][])
24459 {
24460 int i, j;
24461
24462
24463 for (i = 0; i < 3; i++) {
24464 for (j = 0; j < 3; j++) {
24465 r[i][j] = 0.0;
24466 }
24467 }
24468
24469 return;
24470
24471 }
24472
24473
24474 /**
24475 * returns the first argument modulo the second.
24476 * Utility function to retain C use of fmod.
24477 * @param d
24478 * @param d2
24479 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 27 Jan 2010
24480 * @return
24481 */
24482 private static double fmod(double d, double d2) {
24483 return d % d2;
24484 }
24485 //IMPL new 20131202 routines after here
24486
24487 /**
24488 * Star-independent astrometry parameters.
24489 *
24490 * (Vectors eb, eh, em and v are all with respect to BCRS axes.)
24491 *
24492 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 26 Mar 2014
24493 * @since 20131202
24494 */
24495 public static class Astrom {
24496
24497 /** PM time interval (SSB, Julian years) */
24498 public double pmt;
24499 /** SSB to observer (vector, au) [3]*/
24500 public double eb[] = new double[3];
24501 /** Sun to observer (unit vector)[3] */
24502 public double eh[] = new double[3];
24503 /** distance from Sun to observer (au) */
24504 public double em;
24505 /** barycentric observer velocity (vector, c)[3] */
24506 public double v[] = new double[3];
24507 /** sqrt(1-|v|^2): reciprocal of Lorenz factor */
24508 public double bm1;
24509 /** bias-precession-nutation matrix [3][3] */
24510 public double bpn[][] = new double[3][3];
24511 /** longitude + s' + dERA(DUT) (radians) */
24512 public double along;
24513 /** geodetic latitude (radians) */
24514 public double phi;
24515 /** polar motion xp wrt local meridian (radians) */
24516 public double xpl;
24517 /** polar motion yp wrt local meridian (radians) */
24518 public double ypl;
24519 /** sine of geodetic latitude */
24520 public double sphi;
24521 /** cosine of geodetic latitude */
24522 public double cphi;
24523 /** magnitude of diurnal aberration vector */
24524 public double diurab;
24525 /** "local" Earth rotation angle (radians) */
24526 public double eral;
24527 /** refraction constant A (radians) */
24528 public double refa;
24529 /** refraction constant B (radians) */
24530 public double refb;
24531
24532 /**
24533 *
24534 */
24535 public Astrom(){}
24536 } ;
24537
24538 /**
24539 * Body parameters for light deflection.
24540 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 26 Mar 2014
24541 * @since 20131202
24542 */
24543 public static class Ldbody {
24544 /** mass of the body (solar masses) */
24545 public double bm;
24546 /** deflection limiter (radians^2/2) */
24547 public double dl;
24548 /** barycentric PV of the body (au, au/day)[2][3] */
24549 public double pv[][] = new double [2][3];
24550 } ;
24551
24552
24553 /**
24554 * Apply aberration to transform natural direction into proper
24555 * direction.
24556 *
24557 *<p>This function is derived from the International Astronomical Union's
24558 * SOFA (Standards of Fundamental Astronomy) software collection.
24559 *
24560 *<p>Status: support function.
24561 *
24562 *<!-- Given: -->
24563 * @param pnat double[3] natural direction to the source (unit vector)
24564 * @param v double[3] observer barycentric velocity in units of c
24565 * @param s double distance between the Sun and the observer (au)
24566 * @param bm1 double sqrt(1-|v|^2): reciprocal of Lorenz factor
24567 *
24568 *<!-- Returned:-->
24569 * @return ppr double[3] <b>Returned</b> proper direction to source (unit vector)
24570 *
24571 *<p>Notes:
24572 * <ol>
24573 *
24574 * <li> The algorithm is based on Expr. (7.40) in the Explanatory
24575 * Supplement (Urban & Seidelmann 2013), but with the following
24576 * changes:
24577 *
24578 * <p>o Rigorous rather than approximate normalization is applied.
24579 *
24580 * <p>o The gravitational potential term from Expr. (7) in
24581 * Klioner (2003) is added, taking into account only the Sun's
24582 * contribution. This has a maximum effect of about
24583 * 0.4 microarcsecond.
24584 *
24585 * <li> In almost all cases, the maximum accuracy will be limited by the
24586 * supplied velocity. For example, if the SOFA iauEpv00 function is
24587 * used, errors of up to 5 microarcseconds could occur.
24588 *
24589 * </ol>
24590 *<p>References:
24591 * <ul>
24592 *
24593 * <li> Urban, S. & Seidelmann, P. K. (eds), Explanatory Supplement to
24594 * the Astronomical Almanac, 3rd ed., University Science Books
24595 * (2013).
24596 *
24597 * <li> Klioner, Sergei A., "A practical relativistic model for micro-
24598 * arcsecond astrometry in space", Astr. J. 125, 1580-1597 (2003).
24599 *
24600 * </ul>
24601 * Called:
24602 * <ul>
24603 * <li>{@link #jauPdp} scalar product of two p-vectors
24604 *
24605 * </ul>
24606 *@version 2013 October 9
24607 *
24608 *@since JSOFA release 20131202
24609 *
24610 *
24611 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
24612 */
24613 public static double[] jauAb(double pnat[], double v[], double s, double bm1
24614 )
24615 {
24616 int i;
24617 double pdv, w1, w2, r2, w, p[] = new double[3], r;
24618 double ppr[] = new double[3];
24619
24620 pdv = jauPdp(pnat, v);
24621 w1 = 1.0 + pdv/(1.0 + bm1);
24622 w2 = SRS/s;
24623 r2 = 0.0;
24624 for (i = 0; i < 3; i++) {
24625 w = pnat[i]*bm1 + w1*v[i] + w2*(v[i] - pdv*pnat[i]);
24626 p[i] = w;
24627 r2 = r2 + w*w;
24628 }
24629 r = sqrt(r2);
24630 for (i = 0; i < 3; i++) {
24631 ppr[i] = p[i]/r;
24632 }
24633 return ppr;
24634 /* Finished. */
24635
24636
24637 }
24638
24639 /**
24640 * For a geocentric observer, prepare star-independent astrometry
24641 * parameters for transformations between ICRS and GCRS coordinates.
24642 * The Earth ephemeris is supplied by the caller.
24643 *
24644 * The parameters produced by this function are required in the
24645 * parallax, light deflection and aberration parts of the astrometric
24646 * transformation chain.
24647 *
24648 *<p>This function is derived from the International Astronomical Union's
24649 * SOFA (Standards of Fundamental Astronomy) software collection.
24650 *
24651 *<p>Status: support function.
24652 *
24653 *<!-- Given: -->
24654 * @param date1 double TDB as a 2-part...
24655 * @param date2 double ...Julian Date (Note 1)
24656 * @param ebpv double[2][3] Earth barycentric pos/vel (au, au/day)
24657 * @param ehp double[3] Earth heliocentric position (au)
24658 *
24659 *<!-- Returned:-->
24660 * @param astrom jauASTROM <b>Returned</b> star-independent astrometry parameters:
24661 *
24662 *<p>Notes:
24663 * <ol>
24664 *
24665 * <li> The TDB date date1+date2 is a Julian Date, apportioned in any
24666 * convenient way between the two arguments. For example,
24667 * JD(TDB)=2450123.7 could be expressed in any of these ways, among
24668 * others:
24669 * <pre>
24670 * date1 date2
24671 *
24672 * 2450123.7 0.0 (JD method)
24673 * 2451545.0 -1421.3 (J2000 method)
24674 * 2400000.5 50123.2 (MJD method)
24675 * 2450123.5 0.2 (date & time method)
24676 * </pre>
24677 * <p>The JD method is the most natural and convenient to use in cases
24678 * where the loss of several decimal digits of resolution is
24679 * acceptable. The J2000 method is best matched to the way the
24680 * argument is handled internally and will deliver the optimum
24681 * resolution. The MJD method and the date & time methods are both
24682 * good compromises between resolution and convenience. For most
24683 * applications of this function the choice will not be at all
24684 * critical.
24685 *
24686 * <p>TT can be used instead of TDB without any significant impact on
24687 * accuracy.
24688 *
24689 * <li> All the vectors are with respect to BCRS axes.
24690 *
24691 * <li> This is one of several functions that inserts into the astrom
24692 * structure star-independent parameters needed for the chain of
24693 * astrometric transformations {@code ICRS <-> GCRS <-> CIRS <-> observed}.
24694 *
24695 * <p>The various functions support different classes of observer and
24696 * portions of the transformation chain:
24697 * <pre>{@code
24698 * functions observer transformation
24699 *
24700 * iauApcg iauApcg13 geocentric ICRS <-> GCRS
24701 * iauApci iauApci13 terrestrial ICRS <-> CIRS
24702 * iauApco iauApco13 terrestrial ICRS <-> observed
24703 * iauApcs iauApcs13 space ICRS <-> GCRS
24704 * iauAper iauAper13 terrestrial update Earth rotation
24705 * iauApio iauApio13 terrestrial CIRS <-> observed
24706 * }</pre>
24707 *
24708 * <p>Those with names ending in "13" use contemporary SOFA models to
24709 * compute the various ephemerides. The others accept ephemerides
24710 * supplied by the caller.
24711 *
24712 * <p>The transformation from ICRS to GCRS covers space motion,
24713 * parallax, light deflection, and aberration. From GCRS to CIRS
24714 * comprises frame bias and precession-nutation. From CIRS to
24715 * observed takes account of Earth rotation, polar motion, diurnal
24716 * aberration and parallax (unless subsumed into the {@code ICRS <-> GCRS}
24717 * transformation), and atmospheric refraction.
24718 *
24719 * <li> The context structure astrom produced by this function is used by
24720 * iauAtciq* and iauAticq*.
24721 *
24722 * </ol>
24723 * Called:
24724 * <ul>
24725 * <li>{@link #jauApcs} astrometry parameters, ICRS-GCRS, space observer
24726 *
24727 * </ul>
24728 *@version 2013 October 9
24729 *
24730 *@since JSOFA release 20131202
24731 *
24732 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
24733 */
24734 public static void jauApcg(double date1, double date2,
24735 double ebpv[][], double ehp[],
24736 Astrom astrom)
24737 {
24738 /* Geocentric observer */
24739 double pv[][] = { { 0.0, 0.0, 0.0 },
24740 { 0.0, 0.0, 0.0 } };
24741
24742
24743 /* Compute the star-independent astrometry parameters. */
24744 jauApcs(date1, date2, pv, ebpv, ehp, astrom);
24745
24746 /* Finished. */
24747
24748
24749 }
24750
24751 /**
24752 * For a geocentric observer, prepare star-independent astrometry
24753 * parameters for transformations between ICRS and GCRS coordinates.
24754 * The caller supplies the date, and SOFA models are used to predict
24755 * the Earth ephemeris.
24756 *
24757 * The parameters produced by this function are required in the
24758 * parallax, light deflection and aberration parts of the astrometric
24759 * transformation chain.
24760 *
24761 *<p>This function is derived from the International Astronomical Union's
24762 * SOFA (Standards of Fundamental Astronomy) software collection.
24763 *
24764 *<p>Status: support function.
24765 *
24766 *<!-- Given: -->
24767 * @param date1 double TDB as a 2-part...
24768 * @param date2 double ...Julian Date (Note 1)
24769 *
24770 *<!-- Returned:-->
24771 * @param astrom <b>Returned</b> star-independent astrometry parameters:
24772 *
24773 *<p>Notes:
24774 * <ol>
24775 *
24776 * <li> The TDB date date1+date2 is a Julian Date, apportioned in any
24777 * convenient way between the two arguments. For example,
24778 * JD(TDB)=2450123.7 could be expressed in any of these ways, among
24779 * others:
24780 * <pre>
24781 * date1 date2
24782 *
24783 * 2450123.7 0.0 (JD method)
24784 * 2451545.0 -1421.3 (J2000 method)
24785 * 2400000.5 50123.2 (MJD method)
24786 * 2450123.5 0.2 (date & time method)
24787 * </pre>
24788 * <p>The JD method is the most natural and convenient to use in cases
24789 * where the loss of several decimal digits of resolution is
24790 * acceptable. The J2000 method is best matched to the way the
24791 * argument is handled internally and will deliver the optimum
24792 * resolution. The MJD method and the date & time methods are both
24793 * good compromises between resolution and convenience. For most
24794 * applications of this function the choice will not be at all
24795 * critical.
24796 *
24797 * <p>TT can be used instead of TDB without any significant impact on
24798 * accuracy.
24799 *
24800 * <li> All the vectors are with respect to BCRS axes.
24801 *
24802 * <li> In cases where the caller wishes to supply his own Earth
24803 * ephemeris, the function iauApcg can be used instead of the present
24804 * function.
24805 *
24806 * <li> This is one of several functions that inserts into the astrom
24807 * structure star-independent parameters needed for the chain of
24808 * astrometric transformations {@code ICRS <-> GCRS <-> CIRS <-> observed}.
24809 *
24810 * <p>The various functions support different classes of observer and
24811 * portions of the transformation chain:
24812 * <pre>
24813 * {@code
24814 * functions observer transformation
24815 *
24816 * iauApcg iauApcg13 geocentric ICRS <-> GCRS
24817 * iauApci iauApci13 terrestrial ICRS <-> CIRS
24818 * iauApco iauApco13 terrestrial ICRS <-> observed
24819 * iauApcs iauApcs13 space ICRS <-> GCRS
24820 * iauAper iauAper13 terrestrial update Earth rotation
24821 * iauApio iauApio13 terrestrial CIRS <-> observed
24822 * }
24823 * </pre>
24824 * <p>Those with names ending in "13" use contemporary SOFA models to
24825 * compute the various ephemerides. The others accept ephemerides
24826 * supplied by the caller.
24827 *
24828 * <p>The transformation from ICRS to GCRS covers space motion,
24829 * parallax, light deflection, and aberration. From GCRS to CIRS
24830 * comprises frame bias and precession-nutation. From CIRS to
24831 * observed takes account of Earth rotation, polar motion, diurnal
24832 * aberration and parallax (unless subsumed into the {@code ICRS <-> GCRS}
24833 * transformation), and atmospheric refraction.
24834 *
24835 * <li> The context structure astrom produced by this function is used by
24836 * iauAtciq* and iauAticq*.
24837 *
24838 * </ol>
24839 * Called:
24840 * <ul>
24841 * <li>{@link #jauEpv00} Earth position and velocity
24842 * <li>{@link #jauApcg} astrometry parameters, ICRS-GCRS, geocenter
24843 *
24844 * </ul>
24845 *@version 2013 October 9
24846 *
24847 *@since JSOFA release 20131202
24848 *
24849 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
24850 */
24851 public static void jauApcg13(double date1, double date2, Astrom astrom)
24852 {
24853 double ehpv[][] = new double[2][3], ebpv[][] = new double[2][3];
24854
24855
24856 /* Earth barycentric & heliocentric position/velocity (au, au/d). */
24857 jauEpv00(date1, date2, ehpv, ebpv);
24858
24859 /* Compute the star-independent astrometry parameters. */
24860 jauApcg(date1, date2, ebpv, ehpv[0], astrom);
24861
24862 /* Finished. */
24863
24864
24865 }
24866
24867 /**
24868 * For a terrestrial observer, prepare star-independent astrometry
24869 * parameters for transformations between ICRS and geocentric CIRS
24870 * coordinates. The Earth ephemeris and CIP/CIO are supplied by the
24871 * caller.
24872 *
24873 * The parameters produced by this function are required in the
24874 * parallax, light deflection, aberration, and bias-precession-nutation
24875 * parts of the astrometric transformation chain.
24876 *
24877 *<p>This function is derived from the International Astronomical Union's
24878 * SOFA (Standards of Fundamental Astronomy) software collection.
24879 *
24880 *<p>Status: support function.
24881 *
24882 *<!-- Given: -->
24883 * @param date1 double TDB as a 2-part...
24884 * @param date2 double ...Julian Date (Note 1)
24885 * @param ebpv double[2][3] Earth barycentric position/velocity (au, au/day)
24886 * @param ehp double[3] Earth heliocentric position (au)
24887 * @param x double CIP X,Y (components of unit vector)
24888 * @param y double CIP X,Y (components of unit vector)
24889 * @param s double the CIO locator s (radians)
24890 *
24891 *<!-- Returned:-->
24892 * @param astrom <b>Returned</b> star-independent astrometry parameters:
24893 *
24894 *<p>Notes:
24895 * <ol>
24896 *
24897 * <li> The TDB date date1+date2 is a Julian Date, apportioned in any
24898 * convenient way between the two arguments. For example,
24899 * JD(TDB)=2450123.7 could be expressed in any of these ways, among
24900 * others:
24901 * <pre>
24902 * date1 date2
24903 *
24904 * 2450123.7 0.0 (JD method)
24905 * 2451545.0 -1421.3 (J2000 method)
24906 * 2400000.5 50123.2 (MJD method)
24907 * 2450123.5 0.2 (date & time method)
24908 * </pre>
24909 * <p>The JD method is the most natural and convenient to use in cases
24910 * where the loss of several decimal digits of resolution is
24911 * acceptable. The J2000 method is best matched to the way the
24912 * argument is handled internally and will deliver the optimum
24913 * resolution. The MJD method and the date & time methods are both
24914 * good compromises between resolution and convenience. For most
24915 * applications of this function the choice will not be at all
24916 * critical.
24917 *
24918 * <p>TT can be used instead of TDB without any significant impact on
24919 * accuracy.
24920 *
24921 * <li> All the vectors are with respect to BCRS axes.
24922 *
24923 * <li> In cases where the caller does not wish to provide the Earth
24924 * ephemeris and CIP/CIO, the function iauApci13 can be used instead
24925 * of the present function. This computes the required quantities
24926 * using other SOFA functions.
24927 *
24928 * <li> This is one of several functions that inserts into the astrom
24929 * structure star-independent parameters needed for the chain of
24930 * astrometric transformations {@code ICRS <-> GCRS <-> CIRS <-> observed.}
24931 *
24932 * <p>The various functions support different classes of observer and
24933 * portions of the transformation chain:
24934 * <pre>{@code
24935 * functions observer transformation
24936 *
24937 * iauApcg iauApcg13 geocentric ICRS <-> GCRS
24938 * iauApci iauApci13 terrestrial ICRS <-> CIRS
24939 * iauApco iauApco13 terrestrial ICRS <-> observed
24940 * iauApcs iauApcs13 space ICRS <-> GCRS
24941 * iauAper iauAper13 terrestrial update Earth rotation
24942 * iauApio iauApio13 terrestrial CIRS <-> observed
24943 * }</pre>
24944 * <p>Those with names ending in "13" use contemporary SOFA models to
24945 * compute the various ephemerides. The others accept ephemerides
24946 * supplied by the caller.
24947 *
24948 * <p>The transformation from ICRS to GCRS covers space motion,
24949 * parallax, light deflection, and aberration. From GCRS to CIRS
24950 * comprises frame bias and precession-nutation. From CIRS to
24951 * observed takes account of Earth rotation, polar motion, diurnal
24952 * aberration and parallax (unless subsumed into the {@code ICRS <-> GCRS}
24953 * transformation), and atmospheric refraction.
24954 *
24955 * <li> The context structure astrom produced by this function is used by
24956 * iauAtciq* and iauAticq*.
24957 *
24958 * </ol>
24959 * Called:
24960 * <ul>
24961 * <li>{@link #jauApcg} astrometry parameters, ICRS-GCRS, geocenter
24962 * <li>{@link #jauC2ixys} celestial-to-intermediate matrix, given X,Y and s
24963 *
24964 * </ul>
24965 *@version 2013 September 25
24966 *
24967 *@since JSOFA release 20131202
24968 *
24969 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
24970 */
24971 public static void jauApci(double date1, double date2,
24972 double ebpv[][], double ehp[],
24973 double x, double y, double s,
24974 Astrom astrom)
24975 {
24976
24977 /* Star-independent astrometry parameters for geocenter. */
24978 jauApcg(date1, date2, ebpv, ehp, astrom);
24979
24980 /* CIO based BPN matrix. */
24981 astrom.bpn = jauC2ixys(x, y, s);
24982
24983 /* Finished. */
24984
24985
24986 }
24987
24988 /**
24989 * For a terrestrial observer, prepare star-independent astrometry
24990 * parameters for transformations between ICRS and geocentric CIRS
24991 * coordinates. The caller supplies the date, and SOFA models are used
24992 * to predict the Earth ephemeris and CIP/CIO.
24993 *
24994 * The parameters produced by this function are required in the
24995 * parallax, light deflection, aberration, and bias-precession-nutation
24996 * parts of the astrometric transformation chain.
24997 *
24998 *<p>This function is derived from the International Astronomical Union's
24999 * SOFA (Standards of Fundamental Astronomy) software collection.
25000 *
25001 *<p>Status: support function.
25002 *
25003 *<!-- Given: -->
25004 * @param date1 double TDB as a 2-part...
25005 * @param date2 double ...Julian Date (Note 1)
25006 *
25007 *<!-- Returned:-->
25008 * @param astrom jauASTROM <b>Returned</b> star-independent astrometry parameters:
25009 * pmt double <b>Returned</b> PM time interval (SSB, Julian years)
25010 * eb double[3] <b>Returned</b> SSB to observer (vector, au)
25011 * eh double[3] <b>Returned</b> Sun to observer (unit vector)
25012 * em double <b>Returned</b> distance from Sun to observer (au)
25013 * v double[3] <b>Returned</b> barycentric observer velocity (vector, c)
25014 * bm1 double <b>Returned</b> sqrt(1-|v|^2): reciprocal of Lorenz factor
25015 * bpn double[3][3] <b>Returned</b> bias-precession-nutation matrix
25016 * along double <b>Returned</b> unchanged
25017 * xpl double <b>Returned</b> unchanged
25018 * ypl double <b>Returned</b> unchanged
25019 * sphi double <b>Returned</b> unchanged
25020 * cphi double <b>Returned</b> unchanged
25021 * diurab double <b>Returned</b> unchanged
25022 * eral double <b>Returned</b> unchanged
25023 * refa double <b>Returned</b> unchanged
25024 * refb double <b>Returned</b> unchanged
25025 * @return double* <b>Returned</b> equation of the origins (ERA-GST)
25026 *
25027 *<p>Notes:
25028 * <ol>
25029 *
25030 * <li> The TDB date date1+date2 is a Julian Date, apportioned in any
25031 * convenient way between the two arguments. For example,
25032 * JD(TDB)=2450123.7 could be expressed in any of these ways, among
25033 * others:
25034 * <pre>
25035 * date1 date2
25036 *
25037 * 2450123.7 0.0 (JD method)
25038 * 2451545.0 -1421.3 (J2000 method)
25039 * 2400000.5 50123.2 (MJD method)
25040 * 2450123.5 0.2 (date & time method)
25041 * </pre>
25042 * <p>The JD method is the most natural and convenient to use in cases
25043 * where the loss of several decimal digits of resolution is
25044 * acceptable. The J2000 method is best matched to the way the
25045 * argument is handled internally and will deliver the optimum
25046 * resolution. The MJD method and the date & time methods are both
25047 * good compromises between resolution and convenience. For most
25048 * applications of this function the choice will not be at all
25049 * critical.
25050 *
25051 * <p>TT can be used instead of TDB without any significant impact on
25052 * accuracy.
25053 *
25054 * <li> All the vectors are with respect to BCRS axes.
25055 *
25056 * <li> In cases where the caller wishes to supply his own Earth
25057 * ephemeris and CIP/CIO, the function iauApci can be used instead
25058 * of the present function.
25059 *
25060 * <li> This is one of several functions that inserts into the astrom
25061 * structure star-independent parameters needed for the chain of
25062 * astrometric transformations {@code ICRS <-> GCRS <-> CIRS <-> observed.}
25063 *
25064 * <p>The various functions support different classes of observer and
25065 * portions of the transformation chain:
25066 * <pre>{@code
25067 * functions observer transformation
25068 *
25069 * iauApcg iauApcg13 geocentric ICRS <-> GCRS
25070 * iauApci iauApci13 terrestrial ICRS <-> CIRS
25071 * iauApco iauApco13 terrestrial ICRS <-> observed
25072 * iauApcs iauApcs13 space ICRS <-> GCRS
25073 * iauAper iauAper13 terrestrial update Earth rotation
25074 * iauApio iauApio13 terrestrial CIRS <-> observed
25075 * }</pre>
25076 * <p>Those with names ending in "13" use contemporary SOFA models to
25077 * compute the various ephemerides. The others accept ephemerides
25078 * supplied by the caller.
25079 *
25080 * <p>The transformation from ICRS to GCRS covers space motion,
25081 * parallax, light deflection, and aberration. From GCRS to CIRS
25082 * comprises frame bias and precession-nutation. From CIRS to
25083 * observed takes account of Earth rotation, polar motion, diurnal
25084 * aberration and parallax (unless subsumed into the {@code ICRS <-> GCRS}
25085 * transformation), and atmospheric refraction.
25086 *
25087 * <li> The context structure astrom produced by this function is used by
25088 * iauAtciq* and iauAticq*.
25089 *
25090 * </ol>
25091 * Called:
25092 * <ul>
25093 * <li>{@link #jauEpv00} Earth position and velocity
25094 * <li>{@link #jauPnm06a} classical NPB matrix, IAU 2006/2000A
25095 * <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
25096 * <li>{@link #jauS06} the CIO locator s, given X,Y, IAU 2006
25097 * <li>{@link #jauApci} astrometry parameters, ICRS-CIRS
25098 * <li>{@link #jauEors} equation of the origins, given NPB matrix and s
25099 *
25100 * </ul>
25101 *@version 2013 October 9
25102 *
25103 *@since JSOFA release 20131202
25104 *
25105 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
25106 */
25107 public static double jauApci13(double date1, double date2,
25108 Astrom astrom)
25109 {
25110 double ehpv[][] = new double[2][3], ebpv[][] = new double[2][3], r[][], s;
25111
25112
25113 /* Earth barycentric & heliocentric position/velocity (au, au/d). */
25114 jauEpv00(date1, date2, ehpv, ebpv);
25115
25116 /* Form the equinox based BPN matrix, IAU 2006/2000A. */
25117 r = jauPnm06a(date1, date2);
25118
25119 /* Extract CIP X,Y. */
25120 CelestialIntermediatePole cip = jauBpn2xy(r);
25121
25122 /* Obtain CIO locator s. */
25123 s = jauS06(date1, date2, cip.x, cip.y);
25124
25125 /* Compute the star-independent astrometry parameters. */
25126 jauApci(date1, date2, ebpv, ehpv[0], cip.x, cip.y, s, astrom);
25127
25128 /* Equation of the origins. */
25129 return jauEors(r, s);
25130
25131 /* Finished. */
25132
25133
25134 }
25135
25136 /**
25137 * For a terrestrial observer, prepare star-independent astrometry
25138 * parameters for transformations between ICRS and observed
25139 * coordinates. The caller supplies the Earth ephemeris, the Earth
25140 * rotation information and the refraction constants as well as the
25141 * site coordinates.
25142 *
25143 *<p>This function is derived from the International Astronomical Union's
25144 * SOFA (Standards of Fundamental Astronomy) software collection.
25145 *
25146 *<p>Status: support function.
25147 *
25148 *<!-- Given: -->
25149 * @param date1 double TDB as a 2-part...
25150 * @param date2 double ...Julian Date (Note 1)
25151 * @param ebpv double[2][3] Earth barycentric PV (au, au/day, Note 2)
25152 * @param ehp double[3] Earth heliocentric P (au, Note 2)
25153 * @param x double CIP X,Y (components of unit vector)
25154 * @param y double CIP X,Y (components of unit vector)
25155 * @param s double the CIO locator s (radians)
25156 * @param theta double Earth rotation angle (radians)
25157 * @param elong double longitude (radians, east +ve, Note 3)
25158 * @param phi double latitude (geodetic, radians, Note 3)
25159 * @param hm double height above ellipsoid (m, geodetic, Note 3)
25160 * @param xp double polar motion coordinates (radians, Note 4)
25161 * @param yp double polar motion coordinates (radians, Note 4)
25162 * @param sp double the TIO locator s' (radians, Note 4)
25163 * @param refa double refraction constant A (radians, Note 5)
25164 * @param refb double refraction constant B (radians, Note 5)
25165 *
25166 *<!-- Returned:-->
25167 * @param astrom <b>Returned</b> star-independent astrometry parameters:
25168 *
25169 *<p>Notes:
25170 * <ol>
25171 *
25172 * <li> The TDB date date1+date2 is a Julian Date, apportioned in any
25173 * convenient way between the two arguments. For example,
25174 * JD(TDB)=2450123.7 could be expressed in any of these ways, among
25175 * others:
25176 * <pre>
25177 * date1 date2
25178 *
25179 * 2450123.7 0.0 (JD method)
25180 * 2451545.0 -1421.3 (J2000 method)
25181 * 2400000.5 50123.2 (MJD method)
25182 * 2450123.5 0.2 (date & time method)
25183 * </pre>
25184 * <p>The JD method is the most natural and convenient to use in cases
25185 * where the loss of several decimal digits of resolution is
25186 * acceptable. The J2000 method is best matched to the way the
25187 * argument is handled internally and will deliver the optimum
25188 * resolution. The MJD method and the date & time methods are both
25189 * good compromises between resolution and convenience. For most
25190 * applications of this function the choice will not be at all
25191 * critical.
25192 *
25193 * <p>TT can be used instead of TDB without any significant impact on
25194 * accuracy.
25195 *
25196 * <li> The vectors eb, eh, and all the astrom vectors, are with respect
25197 * to BCRS axes.
25198 *
25199 * <li> The geographical coordinates are with respect to the WGS84
25200 * reference ellipsoid. TAKE CARE WITH THE LONGITUDE SIGN
25201 * CONVENTION: the longitude required by the present function is
25202 * right-handed, i.e. east-positive, in accordance with geographical
25203 * convention.
25204 *
25205 * <li> xp and yp are the coordinates (in radians) of the Celestial
25206 * Intermediate Pole with respect to the International Terrestrial
25207 * Reference System (see IERS Conventions), measured along the
25208 * meridians 0 and 90 deg west respectively. sp is the TIO locator
25209 * s', in radians, which positions the Terrestrial Intermediate
25210 * Origin on the equator. For many applications, xp, yp and
25211 * (especially) sp can be set to zero.
25212 *
25213 * <p>Internally, the polar motion is stored in a form rotated onto the
25214 * local meridian.
25215 *
25216 * <li> The refraction constants refa and refb are for use in a
25217 * dZ = A*tan(Z)+B*tan^3(Z) model, where Z is the observed
25218 * (i.e. refracted) zenith distance and dZ is the amount of
25219 * refraction.
25220 *
25221 * <li> It is advisable to take great care with units, as even unlikely
25222 * values of the input parameters are accepted and processed in
25223 * accordance with the models used.
25224 *
25225 * <li> In cases where the caller does not wish to provide the Earth
25226 * Ephemeris, the Earth rotation information and refraction
25227 * constants, the function iauApco13 can be used instead of the
25228 * present function. This starts from UTC and weather readings etc.
25229 * and computes suitable values using other SOFA functions.
25230 *
25231 * <li> This is one of several functions that inserts into the astrom
25232 * structure star-independent parameters needed for the chain of
25233 * astrometric transformations {@code ICRS <-> GCRS <-> CIRS <-> observed.}
25234 *
25235 * <p>The various functions support different classes of observer and
25236 * portions of the transformation chain:
25237 * <pre>{@code
25238 * functions observer transformation
25239 *
25240 * iauApcg iauApcg13 geocentric ICRS <-> GCRS
25241 * iauApci iauApci13 terrestrial ICRS <-> CIRS
25242 * iauApco iauApco13 terrestrial ICRS <-> observed
25243 * iauApcs iauApcs13 space ICRS <-> GCRS
25244 * iauAper iauAper13 terrestrial update Earth rotation
25245 * iauApio iauApio13 terrestrial CIRS <-> observed
25246 * }</pre>
25247 * <p>Those with names ending in "13" use contemporary SOFA models to
25248 * compute the various ephemerides. The others accept ephemerides
25249 * supplied by the caller.
25250 *
25251 * <p>The transformation from ICRS to GCRS covers space motion,
25252 * parallax, light deflection, and aberration. From GCRS to CIRS
25253 * comprises frame bias and precession-nutation. From CIRS to
25254 * observed takes account of Earth rotation, polar motion, diurnal
25255 * aberration and parallax (unless subsumed into the {@code ICRS <-> GCRS}
25256 * transformation), and atmospheric refraction.
25257 *
25258 * <li> The context structure astrom produced by this function is used by
25259 * iauAtioq, iauAtoiq, iauAtciq* and iauAticq*.
25260 *
25261 * </ol>
25262 * Called:
25263 * <ul>
25264 * <li>{@link #jauAper} astrometry parameters: update ERA
25265 * <li>{@link #jauC2ixys} celestial-to-intermediate matrix, given X,Y and s
25266 * <li>{@link #jauPvtob} position/velocity of terrestrial station
25267 * <li>{@link #jauTrxpv} product of transpose of r-matrix and pv-vector
25268 * <li>{@link #jauApcs} astrometry parameters, ICRS-GCRS, space observer
25269 * <li>{@link #jauCr} copy r-matrix
25270 *
25271 * </ul>
25272 *@version 2013 October 9
25273 *
25274 *@since JSOFA release 20131202
25275 *
25276 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
25277 * @throws JSOFAInternalError an internal error has occured
25278 * @throws JSOFAIllegalParameter
25279 */
25280 public static void jauApco(double date1, double date2,
25281 double ebpv[][], double ehp[],
25282 double x, double y, double s, double theta,
25283 double elong, double phi, double hm,
25284 double xp, double yp, double sp,
25285 double refa, double refb,
25286 Astrom astrom) throws JSOFAIllegalParameter, JSOFAInternalError
25287 {
25288 double sl, cl, r[][], pvc[][], pv[][];
25289
25290
25291 /* Longitude with adjustment for TIO locator s'. */
25292 astrom.along = elong + sp;
25293
25294 /* Polar motion, rotated onto the local meridian. */
25295 sl = sin(astrom.along);
25296 cl = cos(astrom.along);
25297 astrom.xpl = xp*cl - yp*sl;
25298 astrom.ypl = xp*sl + yp*cl;
25299
25300 /* Functions of latitude. */
25301 astrom.sphi = sin(phi);
25302 astrom.cphi = cos(phi);
25303
25304 /* Refraction constants. */
25305 astrom.refa = refa;
25306 astrom.refb = refb;
25307
25308 /* Local Earth rotation angle. */
25309 jauAper(theta, astrom);
25310
25311 /* Disable the (redundant) diurnal aberration step. */
25312 astrom.diurab = 0.0;
25313
25314 /* CIO based BPN matrix. */
25315 r = jauC2ixys(x, y, s);
25316
25317 /* Observer's geocentric position and velocity (m, m/s, CIRS). */
25318 pvc = jauPvtob(elong, phi, hm, xp, yp, sp, theta);
25319
25320 /* Rotate into GCRS. */
25321 pv = jauTrxpv(r, pvc);
25322
25323 /* ICRS <-> GCRS parameters. */
25324 jauApcs(date1, date2, pv, ebpv, ehp, astrom);
25325
25326 /* Store the CIO based BPN matrix. */
25327 jauCr(r, astrom.bpn );
25328
25329 /* Finished. */
25330
25331
25332 }
25333
25334 /**
25335 * For a terrestrial observer, prepare star-independent astrometry
25336 * parameters for transformations between ICRS and observed
25337 * coordinates. The caller supplies UTC, site coordinates, ambient air
25338 * conditions and observing wavelength, and SOFA models are used to
25339 * obtain the Earth ephemeris, CIP/CIO and refraction constants.
25340 *
25341 * The parameters produced by this function are required in the
25342 * parallax, light deflection, aberration, and bias-precession-nutation
25343 * parts of the ICRS/CIRS transformations.
25344 *
25345 *<p>This function is derived from the International Astronomical Union's
25346 * SOFA (Standards of Fundamental Astronomy) software collection.
25347 *
25348 *<p>Status: support function.
25349 *
25350 *<!-- Given: -->
25351 * @param utc1 double UTC as a 2-part...
25352 * @param utc2 double ...quasi Julian Date (Notes 1,2)
25353 * @param dut1 double UT1-UTC (seconds, Note 3)
25354 * @param elong double longitude (radians, east +ve, Note 4)
25355 * @param phi double latitude (geodetic, radians, Note 4)
25356 * @param hm double height above ellipsoid (m, geodetic, Notes 4,6)
25357 * @param xp double polar motion coordinates (radians, Note 5)
25358 * @param yp double polar motion coordinates (radians, Note 5)
25359 * @param phpa double pressure at the observer (hPa = mB, Note 6)
25360 * @param tc double ambient temperature at the observer (deg C)
25361 * @param rh double relative humidity at the observer (range 0-1)
25362 * @param wl double wavelength (micrometers, Note 7)
25363 *
25364 *<!-- Returned:-->
25365 * @param astrom <b>Returned</b> star-independent astrometry parameters:
25366 *
25367 *
25368 * @return double <b>Returned</b> equation of the origins (ERA-GST)
25369 *
25370 * @throws JSOFAInternalError an internal error has occured
25371 * @throws JSOFAIllegalParameter
25372 * int status: <b>Returned</b> +1 = dubious year (Note 2)
25373 * 0 = <b>Returned</b> OK
25374 * -1 = <b>Returned</b> unacceptable date
25375 *
25376 *<p>Notes:
25377 * <ol>
25378 *
25379 * <li> utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any
25380 * convenient way between the two arguments, for example where utc1
25381 * is the Julian Day Number and utc2 is the fraction of a day.
25382 *
25383 * <p>However, JD cannot unambiguously represent UTC during a leap
25384 * second unless special measures are taken. The convention in the
25385 * present function is that the JD day represents UTC days whether
25386 * the length is 86399, 86400 or 86401 SI seconds.
25387 *
25388 * <p>Applications should use the function iauDtf2d to convert from
25389 * calendar date and time of day into 2-part quasi Julian Date, as
25390 * it implements the leap-second-ambiguity convention just
25391 * described.
25392 *
25393 * <li> The warning status "dubious year" flags UTCs that predate the
25394 * introduction of the time scale or that are too far in the
25395 * future to be trusted. See iauDat for further details.
25396 *
25397 * <li> UT1-UTC is tabulated in IERS bulletins. It increases by exactly
25398 * one second at the end of each positive UTC leap second,
25399 * introduced in order to keep UT1-UTC within +/- 0.9s. n.b. This
25400 * practice is under review, and in the future UT1-UTC may grow
25401 * essentially without limit.
25402 *
25403 * <li> The geographical coordinates are with respect to the WGS84
25404 * reference ellipsoid. TAKE CARE WITH THE LONGITUDE SIGN: the
25405 * longitude required by the present function is east-positive
25406 * (i.e. right-handed), in accordance with geographical convention.
25407 *
25408 * <li> The polar motion xp,yp can be obtained from IERS bulletins. The
25409 * values are the coordinates (in radians) of the Celestial
25410 * Intermediate Pole with respect to the International Terrestrial
25411 * Reference System (see IERS Conventions 2003), measured along the
25412 * meridians 0 and 90 deg west respectively. For many
25413 * applications, xp and yp can be set to zero.
25414 *
25415 * <p>Internally, the polar motion is stored in a form rotated onto
25416 * the local meridian.
25417 *
25418 * <li> If hm, the height above the ellipsoid of the observing station
25419 * in meters, is not known but phpa, the pressure in hPa (=mB), is
25420 * available, an adequate estimate of hm can be obtained from the
25421 * expression
25422 *
25423 * <p>hm = -29.3 * tsl * log ( phpa / 1013.25 );
25424 *
25425 * <p>where tsl is the approximate sea-level air temperature in K
25426 * (See Astrophysical Quantities, C.W.Allen, 3rd edition, section
25427 * 52). Similarly, if the pressure phpa is not known, it can be
25428 * estimated from the height of the observing station, hm, as
25429 * follows:
25430 *
25431 * <p>phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) );
25432 *
25433 * <p>Note, however, that the refraction is nearly proportional to
25434 * the pressure and that an accurate phpa value is important for
25435 * precise work.
25436 *
25437 * <li> The argument wl specifies the observing wavelength in
25438 * micrometers. The transition from optical to radio is assumed to
25439 * occur at 100 micrometers (about 3000 GHz).
25440 *
25441 * <li> It is advisable to take great care with units, as even unlikely
25442 * values of the input parameters are accepted and processed in
25443 * accordance with the models used.
25444 *
25445 * <li> In cases where the caller wishes to supply his own Earth
25446 * ephemeris, Earth rotation information and refraction constants,
25447 * the function iauApco can be used instead of the present function.
25448 *
25449 * <li> This is one of several functions that inserts into the astrom
25450 * structure star-independent parameters needed for the chain of
25451 * astrometric transformations {@code ICRS <-> GCRS <-> CIRS <-> observed.}
25452 *
25453 * <p>The various functions support different classes of observer and
25454 * portions of the transformation chain:
25455 * <pre>{@code
25456 * functions observer transformation
25457 *
25458 * iauApcg iauApcg13 geocentric ICRS <-> GCRS
25459 * iauApci iauApci13 terrestrial ICRS <-> CIRS
25460 * iauApco iauApco13 terrestrial ICRS <-> observed
25461 * iauApcs iauApcs13 space ICRS <-> GCRS
25462 * iauAper iauAper13 terrestrial update Earth rotation
25463 * iauApio iauApio13 terrestrial CIRS <-> observed
25464 * }</pre>
25465 * <p>Those with names ending in "13" use contemporary SOFA models to
25466 * compute the various ephemerides. The others accept ephemerides
25467 * supplied by the caller.
25468 *
25469 * <p>The transformation from ICRS to GCRS covers space motion,
25470 * parallax, light deflection, and aberration. From GCRS to CIRS
25471 * comprises frame bias and precession-nutation. From CIRS to
25472 * observed takes account of Earth rotation, polar motion, diurnal
25473 * aberration and parallax (unless subsumed into the {@code ICRS <-> GCRS}
25474 * transformation), and atmospheric refraction.
25475 *
25476 * <li> The context structure astrom produced by this function is used
25477 * by iauAtioq, iauAtoiq, iauAtciq* and iauAticq*.
25478 *
25479 * </ol>
25480 * Called:
25481 * <ul>
25482 * <li>{@link #jauUtctai} UTC to TAI
25483 * <li>{@link #jauTaitt} TAI to TT
25484 * <li>{@link #jauUtcut1} UTC to UT1
25485 * <li>{@link #jauEpv00} Earth position and velocity
25486 * <li>{@link #jauPnm06a} classical NPB matrix, IAU 2006/2000A
25487 * <li>{@link #jauBpn2xy} extract CIP X,Y coordinates from NPB matrix
25488 * <li>{@link #jauS06} the CIO locator s, given X,Y, IAU 2006
25489 * <li>{@link #jauEra00} Earth rotation angle, IAU 2000
25490 * <li>{@link #jauSp00} the TIO locator s', IERS 2000
25491 * <li>{@link #jauRefco} refraction constants for given ambient conditions
25492 * <li>{@link #jauApco} astrometry parameters, ICRS-observed
25493 * <li>{@link #jauEors} equation of the origins, given NPB matrix and s
25494 *
25495 * </ul>
25496 *@version 2013 December 5
25497 *
25498 *@since JSOFA release 20131202
25499 *
25500 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
25501 * @throws JSOFAInternalError an internal error has occured
25502 * @throws JSOFAIllegalParameter
25503 */
25504 public static double jauApco13(double utc1, double utc2, double dut1,
25505 double elong, double phi, double hm, double xp, double yp,
25506 double phpa, double tc, double rh, double wl,
25507 Astrom astrom ) throws JSOFAIllegalParameter, JSOFAInternalError
25508 {
25509 double ehpv[][] = new double[2][3], ebpv[][] = new double[2][3],
25510 r[][], s, theta, sp;
25511 double eo;
25512
25513
25514 /* UTC to other time scales. */
25515 JulianDate tai = jauUtctai(utc1, utc2);
25516 JulianDate tt = jauTaitt(tai.djm0, tai.djm1);
25517 JulianDate ut1 = jauUtcut1(utc1, utc2, dut1);
25518
25519 /* Earth barycentric & heliocentric position/velocity (au, au/d). */
25520 jauEpv00(tt.djm0, tt.djm1, ehpv, ebpv);
25521
25522 /* Form the equinox based BPN matrix, IAU 2006/2000A. */
25523 r = jauPnm06a(tt.djm0, tt.djm1);
25524
25525 /* Extract CIP X,Y. */
25526 CelestialIntermediatePole cip = jauBpn2xy(r);
25527
25528 /* Obtain CIO locator s. */
25529 s = jauS06(tt.djm0, tt.djm1, cip.x, cip.y);
25530
25531 /* Earth rotation angle. */
25532 theta = jauEra00(ut1.djm0, ut1.djm1);
25533
25534 /* TIO locator s'. */
25535 sp = jauSp00(tt.djm0, tt.djm1);
25536
25537 /* Refraction constants A and B. */
25538 RefCos ref = jauRefco(phpa, tc, rh, wl);
25539
25540 /* Compute the star-independent astrometry parameters. */
25541 jauApco(tt.djm0, tt.djm1, ebpv, ehpv[0], cip.x, cip.y, s, theta,
25542 elong, phi, hm, xp, yp, sp, ref.a, ref.b, astrom);
25543
25544 /* Equation of the origins. */
25545 eo = jauEors(r, s);
25546
25547 return eo;
25548
25549 /* Finished. */
25550
25551
25552 }
25553
25554 /**
25555 * For an observer whose geocentric position and velocity are known,
25556 * prepare star-independent astrometry parameters for transformations
25557 * between ICRS and GCRS. The Earth ephemeris is supplied by the
25558 * caller.
25559 *
25560 * The parameters produced by this function are required in the space
25561 * motion, parallax, light deflection and aberration parts of the
25562 * astrometric transformation chain.
25563 *
25564 *<p>This function is derived from the International Astronomical Union's
25565 * SOFA (Standards of Fundamental Astronomy) software collection.
25566 *
25567 *<p>Status: support function.
25568 *
25569 *<!-- Given: -->
25570 * @param date1 double TDB as a 2-part...
25571 * @param date2 double ...Julian Date (Note 1)
25572 * @param pv double[2][3] observer's geocentric pos/vel (m, m/s)
25573 * @param ebpv double[2][3] Earth barycentric PV (au, au/day)
25574 * @param ehp double[3] Earth heliocentric P (au)
25575 *
25576 *<!-- Returned:-->
25577 * @param astrom <b>Returned</b> star-independent astrometry parameters:
25578
25579 *<p>Notes:
25580 * <ol>
25581 *
25582 * <li> The TDB date date1+date2 is a Julian Date, apportioned in any
25583 * convenient way between the two arguments. For example,
25584 * JD(TDB)=2450123.7 could be expressed in any of these ways, among
25585 * others:
25586 * <pre>
25587 * date1 date2
25588 *
25589 * 2450123.7 0.0 (JD method)
25590 * 2451545.0 -1421.3 (J2000 method)
25591 * 2400000.5 50123.2 (MJD method)
25592 * 2450123.5 0.2 (date & time method)
25593 * </pre>
25594 * <p>The JD method is the most natural and convenient to use in cases
25595 * where the loss of several decimal digits of resolution is
25596 * acceptable. The J2000 method is best matched to the way the
25597 * argument is handled internally and will deliver the optimum
25598 * resolution. The MJD method and the date & time methods are both
25599 * good compromises between resolution and convenience. For most
25600 * applications of this function the choice will not be at all
25601 * critical.
25602 *
25603 * <p>TT can be used instead of TDB without any significant impact on
25604 * accuracy.
25605 *
25606 * <li> All the vectors are with respect to BCRS axes.
25607 *
25608 * <li> Providing separate arguments for (i) the observer's geocentric
25609 * position and velocity and (ii) the Earth ephemeris is done for
25610 * convenience in the geocentric, terrestrial and Earth orbit cases.
25611 * For deep space applications it maybe more convenient to specify
25612 * zero geocentric position and velocity and to supply the
25613 * observer's position and velocity information directly instead of
25614 * with respect to the Earth. However, note the different units:
25615 * m and m/s for the geocentric vectors, au and au/day for the
25616 * heliocentric and barycentric vectors.
25617 *
25618 * <li> In cases where the caller does not wish to provide the Earth
25619 * ephemeris, the function iauApcs13 can be used instead of the
25620 * present function. This computes the Earth ephemeris using the
25621 * SOFA function iauEpv00.
25622 *
25623 * <li> This is one of several functions that inserts into the astrom
25624 * structure star-independent parameters needed for the chain of
25625 * astrometric transformations {@code ICRS <-> GCRS <-> CIRS <-> observed.}
25626 *
25627 * <p>The various functions support different classes of observer and
25628 * portions of the transformation chain:
25629 *
25630 * <pre>{@code
25631 * functions observer transformation
25632 *
25633 * iauApcg iauApcg13 geocentric ICRS <-> GCRS
25634 * iauApci iauApci13 terrestrial ICRS <-> CIRS
25635 * iauApco iauApco13 terrestrial ICRS <-> observed
25636 * iauApcs iauApcs13 space ICRS <-> GCRS
25637 * iauAper iauAper13 terrestrial update Earth rotation
25638 * iauApio iauApio13 terrestrial CIRS <-> observed
25639 * }</pre>
25640 * <p>Those with names ending in "13" use contemporary SOFA models to
25641 * compute the various ephemerides. The others accept ephemerides
25642 * supplied by the caller.
25643 *
25644 * <p>The transformation from ICRS to GCRS covers space motion,
25645 * parallax, light deflection, and aberration. From GCRS to CIRS
25646 * comprises frame bias and precession-nutation. From CIRS to
25647 * observed takes account of Earth rotation, polar motion, diurnal
25648 * aberration and parallax (unless subsumed into the {@code ICRS <-> GCRS}
25649 * transformation), and atmospheric refraction.
25650 *
25651 * <li> The context structure astrom produced by this function is used by
25652 * iauAtciq* and iauAticq*.
25653 *
25654 * </ol>
25655 * Called:
25656 * <ul>
25657 * <li>{@link #jauCp} copy p-vector
25658 * <li>{@link #jauPm} modulus of p-vector
25659 * <li>{@link #jauPn} decompose p-vector into modulus and direction
25660 * <li>{@link #jauIr} initialize r-matrix to identity
25661 *
25662 * </ul>
25663 *@version 2013 October 9
25664 *
25665 *@since JSOFA release 20131202
25666 *
25667 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
25668 */
25669 public static void jauApcs(double date1, double date2, double pv[][],
25670 double ebpv[][], double ehp[],
25671 Astrom astrom)
25672 {
25673 /* au/d to m/s */
25674 final double AUDMS = DAU/DAYSEC;
25675
25676 /* Light time for 1 au (day) */
25677 final double CR = AULT/DAYSEC;
25678
25679 int i;
25680 double dp, dv, pb[] = new double[3], vb[] = new double[3], ph[] = new double[3], v2, w;
25681
25682
25683 /* Time since reference epoch, years (for proper motion calculation). */
25684 astrom.pmt = ( (date1 - DJ00) + date2 ) / DJY;
25685
25686 /* Adjust Earth ephemeris to observer. */
25687 for (i = 0; i < 3; i++) {
25688 dp = pv[0][i] / DAU;
25689 dv = pv[1][i] / AUDMS;
25690 pb[i] = ebpv[0][i] + dp;
25691 vb[i] = ebpv[1][i] + dv;
25692 ph[i] = ehp[i] + dp;
25693 }
25694
25695 /* Barycentric position of observer (au). */
25696 jauCp(pb, astrom.eb);
25697
25698 /* Heliocentric direction and distance (unit vector and au). */
25699 NormalizedVector nv = jauPn(ph);
25700
25701 astrom.em = nv.r;
25702 astrom.eh = nv.u;
25703
25704 /* Barycentric vel. in units of c, and reciprocal of Lorenz factor. */
25705 v2 = 0.0;
25706 for (i = 0; i < 3; i++) {
25707 w = vb[i] * CR;
25708 astrom.v[i] = w;
25709 v2 += w*w;
25710 }
25711 astrom.bm1 = sqrt(1.0 - v2);
25712
25713 /* Reset the NPB matrix. */
25714 jauIr(astrom.bpn);
25715
25716 /* Finished. */
25717
25718
25719 }
25720
25721 /**
25722 * For an observer whose geocentric position and velocity are known,
25723 * prepare star-independent astrometry parameters for transformations
25724 * between ICRS and GCRS. The Earth ephemeris is from SOFA models.
25725 *
25726 * The parameters produced by this function are required in the space
25727 * motion, parallax, light deflection and aberration parts of the
25728 * astrometric transformation chain.
25729 *
25730 *<p>This function is derived from the International Astronomical Union's
25731 * SOFA (Standards of Fundamental Astronomy) software collection.
25732 *
25733 *<p>Status: support function.
25734 *
25735 *<!-- Given: -->
25736 * @param date1 double TDB as a 2-part...
25737 * @param date2 double ...Julian Date (Note 1)
25738 * @param pv double[2][3] observer's geocentric pos/vel (Note 3)
25739 *
25740 *<!-- Returned:-->
25741 * @param astrom <b>Returned</b> star-independent astrometry parameters:
25742 *
25743 *<p>Notes:
25744 * <ol>
25745 *
25746 * <li> The TDB date date1+date2 is a Julian Date, apportioned in any
25747 * convenient way between the two arguments. For example,
25748 * JD(TDB)=2450123.7 could be expressed in any of these ways, among
25749 * others:
25750 * <pre>
25751 * date1 date2
25752 *
25753 * 2450123.7 0.0 (JD method)
25754 * 2451545.0 -1421.3 (J2000 method)
25755 * 2400000.5 50123.2 (MJD method)
25756 * 2450123.5 0.2 (date & time method)
25757 * </pre>
25758 * <p>The JD method is the most natural and convenient to use in cases
25759 * where the loss of several decimal digits of resolution is
25760 * acceptable. The J2000 method is best matched to the way the
25761 * argument is handled internally and will deliver the optimum
25762 * resolution. The MJD method and the date & time methods are both
25763 * good compromises between resolution and convenience. For most
25764 * applications of this function the choice will not be at all
25765 * critical.
25766 *
25767 * <p>TT can be used instead of TDB without any significant impact on
25768 * accuracy.
25769 *
25770 * <li> All the vectors are with respect to BCRS axes.
25771 *
25772 * <li> The observer's position and velocity pv are geocentric but with
25773 * respect to BCRS axes, and in units of m and m/s. No assumptions
25774 * are made about proximity to the Earth, and the function can be
25775 * used for deep space applications as well as Earth orbit and
25776 * terrestrial.
25777 *
25778 * <li> In cases where the caller wishes to supply his own Earth
25779 * ephemeris, the function iauApcs can be used instead of the present
25780 * function.
25781 *
25782 * <li> This is one of several functions that inserts into the astrom
25783 * structure star-independent parameters needed for the chain of
25784 * astrometric transformations {@code ICRS <-> GCRS <-> CIRS <-> observed.}
25785 *
25786 * <p>The various functions support different classes of observer and
25787 * portions of the transformation chain:
25788 * <pre>{@code
25789 * functions observer transformation
25790 *
25791 * iauApcg iauApcg13 geocentric ICRS <-> GCRS
25792 * iauApci iauApci13 terrestrial ICRS <-> CIRS
25793 * iauApco iauApco13 terrestrial ICRS <-> observed
25794 * iauApcs iauApcs13 space ICRS <-> GCRS
25795 * iauAper iauAper13 terrestrial update Earth rotation
25796 * iauApio iauApio13 terrestrial CIRS <-> observed
25797 * }</pre>
25798 * <p>Those with names ending in "13" use contemporary SOFA models to
25799 * compute the various ephemerides. The others accept ephemerides
25800 * supplied by the caller.
25801 *
25802 * <p>The transformation from ICRS to GCRS covers space motion,
25803 * parallax, light deflection, and aberration. From GCRS to CIRS
25804 * comprises frame bias and precession-nutation. From CIRS to
25805 * observed takes account of Earth rotation, polar motion, diurnal
25806 * aberration and parallax (unless subsumed into the {@code ICRS <-> GCRS}
25807 * transformation), and atmospheric refraction.
25808 *
25809 * <li> The context structure astrom produced by this function is used by
25810 * iauAtciq* and iauAticq*.
25811 *
25812 * </ol>
25813 * Called:
25814 * <ul>
25815 * <li>{@link #jauEpv00} Earth position and velocity
25816 * <li>{@link #jauApcs} astrometry parameters, ICRS-GCRS, space observer
25817 *
25818 * </ul>
25819 *@version 2013 October 9
25820 *
25821 *@since JSOFA release 20131202
25822 *
25823 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
25824 */
25825 public static void jauApcs13(double date1, double date2, double pv[][],
25826 Astrom astrom)
25827 {
25828 double ehpv[][] = new double[2][3], ebpv[][] = new double[2][3];
25829
25830
25831 /* Earth barycentric & heliocentric position/velocity (au, au/d). */
25832 jauEpv00(date1, date2, ehpv, ebpv);
25833
25834 /* Compute the star-independent astrometry parameters. */
25835 jauApcs(date1, date2, pv, ebpv, ehpv[0], astrom);
25836
25837 /* Finished. */
25838
25839
25840 }
25841
25842 /**
25843 * In the star-independent astrometry parameters, update only the
25844 * Earth rotation angle, supplied by the caller explicitly.
25845 *
25846 *<p>This function is derived from the International Astronomical Union's
25847 * SOFA (Standards of Fundamental Astronomy) software collection.
25848 *
25849 *<p>Status: support function.
25850 *
25851 *<!-- Given: -->
25852 * @param theta double Earth rotation angle (radians, Note 2)
25853 * @param astrom Astrom star-independent astrometry parameters:{@code
25854 * pmt double not used
25855 * eb double[3] not used
25856 * eh double[3] not used
25857 * em double not used
25858 * v double[3] not used
25859 * bm1 double not used
25860 * bpn double[3][3] not used
25861 * along double longitude + s' (radians)
25862 * xpl double not used
25863 * ypl double not used
25864 * sphi double not used
25865 * cphi double not used
25866 * diurab double not used
25867 * eral double not used
25868 * refa double not used
25869 * refb double not used}
25870 *
25871 *<!-- Returned:-->
25872 * astrom <b>Returned</b> star-independent astrometry parameters:
25873 *
25874 *<p>Notes:
25875 * <ol>
25876 *
25877 * <li> This function exists to enable sidereal-tracking applications to
25878 * avoid wasteful recomputation of the bulk of the astrometry
25879 * parameters: only the Earth rotation is updated.
25880 *
25881 * <li> For targets expressed as equinox based positions, such as
25882 * classical geocentric apparent (RA,Dec), the supplied theta can be
25883 * Greenwich apparent sidereal time rather than Earth rotation
25884 * angle.
25885 *
25886 * <li> The function iauAper13 can be used instead of the present
25887 * function, and starts from UT1 rather than ERA itself.
25888 *
25889 * <li> This is one of several functions that inserts into the astrom
25890 * structure star-independent parameters needed for the chain of
25891 * astrometric transformations {@code ICRS <-> GCRS <-> CIRS <-> observed.}
25892 *
25893 * <p>The various functions support different classes of observer and
25894 * portions of the transformation chain:
25895 * <pre>{@code
25896 * functions observer transformation
25897 *
25898 * iauApcg iauApcg13 geocentric ICRS <-> GCRS
25899 * iauApci iauApci13 terrestrial ICRS <-> CIRS
25900 * iauApco iauApco13 terrestrial ICRS <-> observed
25901 * iauApcs iauApcs13 space ICRS <-> GCRS
25902 * iauAper iauAper13 terrestrial update Earth rotation
25903 * iauApio iauApio13 terrestrial CIRS <-> observed
25904 * }</pre>
25905 * <p>Those with names ending in "13" use contemporary SOFA models to
25906 * compute the various ephemerides. The others accept ephemerides
25907 * supplied by the caller.
25908 *
25909 * <p>The transformation from ICRS to GCRS covers space motion,
25910 * parallax, light deflection, and aberration. From GCRS to CIRS
25911 * comprises frame bias and precession-nutation. From CIRS to
25912 * observed takes account of Earth rotation, polar motion, diurnal
25913 * aberration and parallax (unless subsumed into the {@code ICRS <-> GCRS}
25914 * transformation), and atmospheric refraction.
25915 *
25916 * </ol>
25917 *@version 2013 September 25
25918 *
25919 *@since JSOFA release 20131202
25920 *
25921 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
25922 */
25923 public static void jauAper(double theta, Astrom astrom)
25924 {
25925 astrom.eral = theta + astrom.along;
25926
25927 /* Finished. */
25928
25929
25930 }
25931
25932 /**
25933 * In the star-independent astrometry parameters, update only the
25934 * Earth rotation angle. The caller provides UT1, (n.b. not UTC).
25935 *
25936 *<p>This function is derived from the International Astronomical Union's
25937 * SOFA (Standards of Fundamental Astronomy) software collection.
25938 *
25939 *<p>Status: support function.
25940 *
25941 *<!-- Given: -->
25942 * @param ut11 double UT1 as a 2-part...
25943 * @param ut12 double ...Julian Date (Note 1)
25944 * @param astrom star-independent astrometry parameters:
25945 * pmt double not used
25946 * eb double[3] not used
25947 * eh double[3] not used
25948 * em double not used
25949 * v double[3] not used
25950 * bm1 double not used
25951 * bpn double[3][3] not used
25952 * along double longitude + s' (radians)
25953 * xpl double not used
25954 * ypl double not used
25955 * sphi double not used
25956 * cphi double not used
25957 * diurab double not used
25958 * eral double not used
25959 * refa double not used
25960 * refb double not used
25961 *
25962 *<!-- Returned:-->
25963 * @param astrom <b>Returned</b> star-independent astrometry parameters:
25964 *
25965 *<p>Notes:
25966 * <ol>
25967 *
25968 * <li> The UT1 date (n.b. not UTC) ut11+ut12 is a Julian Date,
25969 * apportioned in any convenient way between the arguments ut11 and
25970 * ut12. For example, JD(UT1)=2450123.7 could be expressed in any
25971 * of these ways, among others:
25972 *
25973 * <p>ut11 ut12
25974 *
25975 * 2450123.7 0.0 (JD method)
25976 * 2451545.0 -1421.3 (J2000 method)
25977 * 2400000.5 50123.2 (MJD method)
25978 * 2450123.5 0.2 (date & time method)
25979 *
25980 * <p>The JD method is the most natural and convenient to use in cases
25981 * where the loss of several decimal digits of resolution is
25982 * acceptable. The J2000 and MJD methods are good compromises
25983 * between resolution and convenience. The date & time method is
25984 * best matched to the algorithm used: maximum precision is
25985 * delivered when the ut11 argument is for 0hrs UT1 on the day in
25986 * question and the ut12 argument lies in the range 0 to 1, or vice
25987 * versa.
25988 *
25989 * <li> If the caller wishes to provide the Earth rotation angle itself,
25990 * the function iauAper can be used instead. One use of this
25991 * technique is to substitute Greenwich apparent sidereal time and
25992 * thereby to support equinox based transformations directly.
25993 *
25994 * <li> This is one of several functions that inserts into the astrom
25995 * structure star-independent parameters needed for the chain of
25996 * astrometric transformations {@code ICRS <-> GCRS <-> CIRS <-> observed.}
25997 *
25998 * <p>The various functions support different classes of observer and
25999 * portions of the transformation chain:
26000 * <pre>{@code
26001 * functions observer transformation
26002 *
26003 * <p>iauApcg iauApcg13 geocentric ICRS <-> GCRS
26004 * iauApci iauApci13 terrestrial ICRS <-> CIRS
26005 * iauApco iauApco13 terrestrial ICRS <-> observed
26006 * iauApcs iauApcs13 space ICRS <-> GCRS
26007 * iauAper iauAper13 terrestrial update Earth rotation
26008 * iauApio iauApio13 terrestrial CIRS <-> observed
26009 * }</pre>
26010 * <p>Those with names ending in "13" use contemporary SOFA models to
26011 * compute the various ephemerides. The others accept ephemerides
26012 * supplied by the caller.
26013 *
26014 * <p>The transformation from ICRS to GCRS covers space motion,
26015 * parallax, light deflection, and aberration. From GCRS to CIRS
26016 * comprises frame bias and precession-nutation. From CIRS to
26017 * observed takes account of Earth rotation, polar motion, diurnal
26018 * aberration and parallax (unless subsumed into the {@code ICRS <-> GCRS}
26019 * transformation), and atmospheric refraction.
26020 *
26021 * </ol>
26022 * Called:
26023 * <ul>
26024 * <li>{@link #jauAper} astrometry parameters: update ERA
26025 * <li>{@link #jauEra00} Earth rotation angle, IAU 2000
26026 *
26027 * </ul>
26028 *@version 2013 September 25
26029 *
26030 *@since JSOFA release 20131202
26031 *
26032 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
26033 */
26034 public static void jauAper13(double ut11, double ut12, Astrom astrom)
26035 {
26036 jauAper(jauEra00(ut11,ut12), astrom);
26037
26038 /* Finished. */
26039
26040
26041 }
26042
26043 /**
26044 * For a terrestrial observer, prepare star-independent astrometry
26045 * parameters for transformations between CIRS and observed
26046 * coordinates. The caller supplies the Earth orientation information
26047 * and the refraction constants as well as the site coordinates.
26048 *
26049 *<p>This function is derived from the International Astronomical Union's
26050 * SOFA (Standards of Fundamental Astronomy) software collection.
26051 *
26052 *<p>Status: support function.
26053 *
26054 *<!-- Given: -->
26055 * @param sp double the TIO locator s' (radians, Note 1)
26056 * @param theta double Earth rotation angle (radians)
26057 * @param elong double longitude (radians, east +ve, Note 2)
26058 * @param phi double geodetic latitude (radians, Note 2)
26059 * @param hm double height above ellipsoid (m, geodetic Note 2)
26060 * @param xp double polar motion coordinates (radians, Note 3)
26061 * @param yp double polar motion coordinates (radians, Note 3)
26062 * @param refa double refraction constant A (radians, Note 4)
26063 * @param refb double refraction constant B (radians, Note 4)
26064 *
26065 *<!-- Returned:-->
26066 * @param astrom {@link Astrom} <b>Returned</b> star-independent astrometry parameters:
26067 *
26068 *<p>Notes:
26069 * <ol>
26070 *
26071 * <li> sp, the TIO locator s', is a tiny quantity needed only by the
26072 * most precise applications. It can either be set to zero or
26073 * predicted using the SOFA function iauSp00.
26074 *
26075 * <li> The geographical coordinates are with respect to the WGS84
26076 * reference ellipsoid. TAKE CARE WITH THE LONGITUDE SIGN: the
26077 * longitude required by the present function is east-positive
26078 * (i.e. right-handed), in accordance with geographical convention.
26079 *
26080 * <li> The polar motion xp,yp can be obtained from IERS bulletins. The
26081 * values are the coordinates (in radians) of the Celestial
26082 * Intermediate Pole with respect to the International Terrestrial
26083 * Reference System (see IERS Conventions 2003), measured along the
26084 * meridians 0 and 90 deg west respectively. For many applications,
26085 * xp and yp can be set to zero.
26086 *
26087 * <p>Internally, the polar motion is stored in a form rotated onto the
26088 * local meridian.
26089 *
26090 * <li> The refraction constants refa and refb are for use in a
26091 * dZ = A*tan(Z)+B*tan^3(Z) model, where Z is the observed
26092 * (i.e. refracted) zenith distance and dZ is the amount of
26093 * refraction.
26094 *
26095 * <li> It is advisable to take great care with units, as even unlikely
26096 * values of the input parameters are accepted and processed in
26097 * accordance with the models used.
26098 *
26099 * <li> In cases where the caller does not wish to provide the Earth
26100 * rotation information and refraction constants, the function
26101 * iauApio13 can be used instead of the present function. This
26102 * starts from UTC and weather readings etc. and computes suitable
26103 * values using other SOFA functions.
26104 *
26105 * <li> This is one of several functions that inserts into the astrom
26106 * structure star-independent parameters needed for the chain of
26107 * astrometric transformations {@code ICRS <-> GCRS <-> CIRS <-> observed.}
26108 *
26109 * <p>The various functions support different classes of observer and
26110 * portions of the transformation chain:
26111 *<pre>{@code
26112 * functions observer transformation
26113 *
26114 * iauApcg iauApcg13 geocentric ICRS <-> GCRS
26115 * iauApci iauApci13 terrestrial ICRS <-> CIRS
26116 * iauApco iauApco13 terrestrial ICRS <-> observed
26117 * iauApcs iauApcs13 space ICRS <-> GCRS
26118 * iauAper iauAper13 terrestrial update Earth rotation
26119 * iauApio iauApio13 terrestrial CIRS <-> observed
26120 *}</pre>
26121 * <p>Those with names ending in "13" use contemporary SOFA models to
26122 * compute the various ephemerides. The others accept ephemerides
26123 * supplied by the caller.
26124 *
26125 * <p>The transformation from ICRS to GCRS covers space motion,
26126 * parallax, light deflection, and aberration. From GCRS to CIRS
26127 * comprises frame bias and precession-nutation. From CIRS to
26128 * observed takes account of Earth rotation, polar motion, diurnal
26129 * aberration and parallax (unless subsumed into the {@code ICRS <-> GCRS}
26130 * transformation), and atmospheric refraction.
26131 *
26132 * <li> The context structure astrom produced by this function is used by
26133 * iauAtioq and iauAtoiq.
26134 *
26135 * </ol>
26136 * Called:
26137 * <ul>
26138 * <li>{@link #jauPvtob} position/velocity of terrestrial station
26139 * <li>{@link #jauAper} astrometry parameters: update ERA
26140 *
26141 * </ul>
26142 *@version 2013 October 9
26143 *
26144 *@since JSOFA release 20131202
26145 *
26146 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
26147 * @throws JSOFAInternalError an internal error has occured
26148 * @throws JSOFAIllegalParameter
26149 */
26150 public static void jauApio(double sp, double theta,
26151 double elong, double phi, double hm, double xp, double yp,
26152 double refa, double refb,
26153 Astrom astrom) throws JSOFAIllegalParameter, JSOFAInternalError
26154 {
26155 double sl, cl, pv[][];
26156
26157
26158 /* Longitude with adjustment for TIO locator s'. */
26159 astrom.along = elong + sp;
26160
26161 /* Polar motion, rotated onto the local meridian. */
26162 sl = sin(astrom.along);
26163 cl = cos(astrom.along);
26164 astrom.xpl = xp*cl - yp*sl;
26165 astrom.ypl = xp*sl + yp*cl;
26166
26167 /* Functions of latitude. */
26168 astrom.sphi = sin(phi);
26169 astrom.cphi = cos(phi);
26170
26171 /* Observer's geocentric position and velocity (m, m/s, CIRS). */
26172 pv = jauPvtob(elong, phi, hm, xp, yp, sp, theta);
26173
26174 /* Magnitude of diurnal aberration vector. */
26175 astrom.diurab = sqrt(pv[1][0]*pv[1][0]+pv[1][1]*pv[1][1]) / CMPS;
26176
26177 /* Refraction constants. */
26178 astrom.refa = refa;
26179 astrom.refb = refb;
26180
26181 /* Local Earth rotation angle. */
26182 jauAper(theta, astrom);
26183
26184 /* Finished. */
26185
26186
26187 }
26188
26189 /**
26190 * For a terrestrial observer, prepare star-independent astrometry
26191 * parameters for transformations between CIRS and observed
26192 * coordinates. The caller supplies UTC, site coordinates, ambient air
26193 * conditions and observing wavelength.
26194 *
26195 *<p>This function is derived from the International Astronomical Union's
26196 * SOFA (Standards of Fundamental Astronomy) software collection.
26197 *
26198 *<p>Status: support function.
26199 *
26200 *<!-- Given: -->
26201 * @param utc1 double UTC as a 2-part...
26202 * @param utc2 double ...quasi Julian Date (Notes 1,2)
26203 * @param dut1 double UT1-UTC (seconds)
26204 * @param elong double longitude (radians, east +ve, Note 3)
26205 * @param phi double geodetic latitude (radians, Note 3)
26206 * @param hm double height above ellipsoid (m, geodetic Notes 4,6)
26207 * @param xp double polar motion coordinates (radians, Note 5)
26208 * @param yp double polar motion coordinates (radians, Note 5)
26209 * @param phpa double pressure at the observer (hPa = mB, Note 6)
26210 * @param tc double ambient temperature at the observer (deg C)
26211 * @param rh double relative humidity at the observer (range 0-1)
26212 * @param wl double wavelength (micrometers, Note 7)
26213 *
26214 *<!-- Returned:-->
26215 * @param astrom <b>Returned</b> star-independent astrometry parameters:
26216 * @throws JSOFAInternalError an internal error has occured
26217 * @throws JSOFAIllegalParameter
26218 *
26219 * int status: <b>Returned</b> +1 = dubious year (Note 2)
26220 * 0 = <b>Returned</b> OK
26221 * -1 = <b>Returned</b> unacceptable date
26222 *
26223 *<p>Notes:
26224 * <ol>
26225 *
26226 * <li> utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any
26227 * convenient way between the two arguments, for example where utc1
26228 * is the Julian Day Number and utc2 is the fraction of a day.
26229 *
26230 * <p>However, JD cannot unambiguously represent UTC during a leap
26231 * second unless special measures are taken. The convention in the
26232 * present function is that the JD day represents UTC days whether
26233 * the length is 86399, 86400 or 86401 SI seconds.
26234 *
26235 * <p>Applications should use the function iauDtf2d to convert from
26236 * calendar date and time of day into 2-part quasi Julian Date, as
26237 * it implements the leap-second-ambiguity convention just
26238 * described.
26239 *
26240 * <li> The warning status "dubious year" flags UTCs that predate the
26241 * introduction of the time scale or that are too far in the future
26242 * to be trusted. See iauDat for further details.
26243 *
26244 * <li> UT1-UTC is tabulated in IERS bulletins. It increases by exactly
26245 * one second at the end of each positive UTC leap second,
26246 * introduced in order to keep UT1-UTC within +/- 0.9s. n.b. This
26247 * practice is under review, and in the future UT1-UTC may grow
26248 * essentially without limit.
26249 *
26250 * <li> The geographical coordinates are with respect to the WGS84
26251 * reference ellipsoid. TAKE CARE WITH THE LONGITUDE SIGN: the
26252 * longitude required by the present function is east-positive
26253 * (i.e. right-handed), in accordance with geographical convention.
26254 *
26255 * <li> The polar motion xp,yp can be obtained from IERS bulletins. The
26256 * values are the coordinates (in radians) of the Celestial
26257 * Intermediate Pole with respect to the International Terrestrial
26258 * Reference System (see IERS Conventions 2003), measured along the
26259 * meridians 0 and 90 deg west respectively. For many applications,
26260 * xp and yp can be set to zero.
26261 *
26262 * <p>Internally, the polar motion is stored in a form rotated onto
26263 * the local meridian.
26264 *
26265 * <li> If hm, the height above the ellipsoid of the observing station
26266 * in meters, is not known but phpa, the pressure in hPa (=mB), is
26267 * available, an adequate estimate of hm can be obtained from the
26268 * expression
26269 *
26270 * <p>hm = -29.3 * tsl * log ( phpa / 1013.25 );
26271 *
26272 * <p>where tsl is the approximate sea-level air temperature in K
26273 * (See Astrophysical Quantities, C.W.Allen, 3rd edition, section
26274 * 52). Similarly, if the pressure phpa is not known, it can be
26275 * estimated from the height of the observing station, hm, as
26276 * follows:
26277 *
26278 * <p>phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) );
26279 *
26280 * <p>Note, however, that the refraction is nearly proportional to the
26281 * pressure and that an accurate phpa value is important for
26282 * precise work.
26283 *
26284 * <li> The argument wl specifies the observing wavelength in
26285 * micrometers. The transition from optical to radio is assumed to
26286 * occur at 100 micrometers (about 3000 GHz).
26287 *
26288 * <li> It is advisable to take great care with units, as even unlikely
26289 * values of the input parameters are accepted and processed in
26290 * accordance with the models used.
26291 *
26292 * <li> In cases where the caller wishes to supply his own Earth
26293 * rotation information and refraction constants, the function
26294 * iauApc can be used instead of the present function.
26295 *
26296 * <li> This is one of several functions that inserts into the astrom
26297 * structure star-independent parameters needed for the chain of
26298 * astrometric transformations {@code ICRS <-> GCRS <-> CIRS <-> observed.}
26299 *
26300 * <p>The various functions support different classes of observer and
26301 * portions of the transformation chain:
26302 * <pre>{@code
26303 * functions observer transformation
26304 *
26305 * iauApcg iauApcg13 geocentric ICRS <-> GCRS
26306 * iauApci iauApci13 terrestrial ICRS <-> CIRS
26307 * iauApco iauApco13 terrestrial ICRS <-> observed
26308 * iauApcs iauApcs13 space ICRS <-> GCRS
26309 * iauAper iauAper13 terrestrial update Earth rotation
26310 * iauApio iauApio13 terrestrial CIRS <-> observed
26311 * }</pre>
26312 * <p>Those with names ending in "13" use contemporary SOFA models to
26313 * compute the various ephemerides. The others accept ephemerides
26314 * supplied by the caller.
26315 *
26316 * <p>The transformation from ICRS to GCRS covers space motion,
26317 * parallax, light deflection, and aberration. From GCRS to CIRS
26318 * comprises frame bias and precession-nutation. From CIRS to
26319 * observed takes account of Earth rotation, polar motion, diurnal
26320 * aberration and parallax (unless subsumed into the {@code ICRS <-> GCRS}
26321 * transformation), and atmospheric refraction.
26322 *
26323 * <li> The context structure astrom produced by this function is used
26324 * by iauAtioq and iauAtoiq.
26325 *
26326 * </ol>
26327 * Called:
26328 * <ul>
26329 * <li>{@link #jauUtctai} UTC to TAI
26330 * <li>{@link #jauTaitt} TAI to TT
26331 * <li>{@link #jauUtcut1} UTC to UT1
26332 * <li>{@link #jauSp00} the TIO locator s', IERS 2000
26333 * <li>{@link #jauEra00} Earth rotation angle, IAU 2000
26334 * <li>{@link #jauRefco} refraction constants for given ambient conditions
26335 * <li>{@link #jauApio} astrometry parameters, CIRS-observed
26336 *
26337 * </ul>
26338 *@version 2013 October 9
26339 *
26340 *@since JSOFA release 20131202
26341 *
26342 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
26343 * @throws JSOFAInternalError an internal error has occured
26344 * @throws JSOFAIllegalParameter
26345 */
26346 public static void jauApio13(double utc1, double utc2, double dut1,
26347 double elong, double phi, double hm, double xp, double yp,
26348 double phpa, double tc, double rh, double wl,
26349 Astrom astrom) throws JSOFAIllegalParameter, JSOFAInternalError
26350 {
26351 double sp, theta;
26352
26353
26354 /* UTC to other time scales. */
26355 JulianDate tai = jauUtctai(utc1, utc2);
26356 JulianDate tt = jauTaitt(tai.djm0, tai.djm1);
26357 JulianDate ut1 = jauUtcut1(utc1, utc2, dut1);
26358
26359 /* TIO locator s'. */
26360 sp = jauSp00(tt.djm0, tt.djm1);
26361
26362 /* Earth rotation angle. */
26363 theta = jauEra00(ut1.djm0, ut1.djm1);
26364
26365 /* Refraction constants A and B. */
26366 RefCos refco = jauRefco(phpa, tc, rh, wl);
26367
26368 /* CIRS <-> observed astrometry parameters. */
26369 jauApio(sp, theta, elong, phi, hm, xp, yp, refco.a, refco.b, astrom);
26370
26371
26372 /* Finished. */
26373
26374
26375 }
26376
26377 /**
26378 * Transform ICRS star data, epoch J2000.0, to CIRS.
26379 *
26380 *<p>This function is derived from the International Astronomical Union's
26381 * SOFA (Standards of Fundamental Astronomy) software collection.
26382 *
26383 *<p>Status: support function.
26384 *
26385 *<!-- Given: -->
26386 * @param rc double ICRS right ascension at J2000.0 (radians, Note 1)
26387 * @param dc double ICRS declination at J2000.0 (radians, Note 1)
26388 * @param pr double RA proper motion (radians/year; Note 2)
26389 * @param pd double Dec proper motion (radians/year)
26390 * @param px double parallax (arcsec)
26391 * @param rv double radial velocity (km/s, +ve if receding)
26392 * @param date1 double TDB as a 2-part...
26393 * @param date2 double ...Julian Date (Note 3)
26394 *
26395 *<!-- Returned:-->
26396 * @return double* <b>Returned</b> CIRS geocentric RA,Dec (radians)
26397 * eo double* <b>Returned</b> equation of the origins (ERA-GST, Note 5)
26398 *
26399 *<p>Notes:
26400 * <ol>
26401 *
26402 * <li> Star data for an epoch other than J2000.0 (for example from the
26403 * Hipparcos catalog, which has an epoch of J1991.25) will require a
26404 * preliminary call to iauPmsafe before use.
26405 *
26406 * <li> The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt.
26407 *
26408 * <li> The TDB date date1+date2 is a Julian Date, apportioned in any
26409 * convenient way between the two arguments. For example,
26410 * JD(TDB)=2450123.8g could be expressed in any of these ways, among
26411 * others:
26412 *
26413 * date1 date2
26414 *
26415 * 2450123.8g 0.0 (JD method)
26416 * 2451545.0 -1421.3 (J2000 method)
26417 * 2400000.5 50123.2 (MJD method)
26418 * 2450123.5 0.2 (date & time method)
26419 *
26420 * <p>The JD method is the most natural and convenient to use in cases
26421 * where the loss of several decimal digits of resolution is
26422 * acceptable. The J2000 method is best matched to the way the
26423 * argument is handled internally and will deliver the optimum
26424 * resolution. The MJD method and the date & time methods are both
26425 * good compromises between resolution and convenience. For most
26426 * applications of this function the choice will not be at all
26427 * critical.
26428 *
26429 * <p>TT can be used instead of TDB without any significant impact on
26430 * accuracy.
26431 *
26432 * <li> The available accuracy is better than 1 milliarcsecond, limited
26433 * mainly by the precession-nutation model that is used, namely
26434 * IAU 2000A/2006. Very close to solar system bodies, additional
26435 * errors of up to several milliarcseconds can occur because of
26436 * unmodeled light deflection; however, the Sun's contribution is
26437 * taken into account, to first order. The accuracy limitations of
26438 * the SOFA function iauEpv00 (used to compute Earth position and
26439 * velocity) can contribute aberration errors of up to
26440 * 5 microarcseconds. Light deflection at the Sun's limb is
26441 * uncertain at the 0.4 mas level.
26442 *
26443 * <li> Should the transformation to (equinox based) apparent place be
26444 * required rather than (CIO based) intermediate place, subtract the
26445 * equation of the origins from the returned right ascension:
26446 * RA = RI - EO. (The iauAnp function can then be applied, as
26447 * required, to keep the result in the conventional 0-2pi range.)
26448 *
26449 * </ol>
26450 * Called:
26451 * <ul>
26452 * <li>{@link #jauApci13} astrometry parameters, ICRS-CIRS, 2013
26453 * <li>{@link #jauAtciq} quick ICRS to CIRS
26454 *
26455 * </ul>
26456 *@version 2013 October 9
26457 *
26458 *@since JSOFA release 20131202
26459 *
26460 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
26461 */
26462 public static SphericalCoordinateEO jauAtci13(double rc, double dc,
26463 double pr, double pd, double px, double rv,
26464 double date1, double date2)
26465 {
26466 /* Star-independent astrometry parameters */
26467 Astrom astrom = new Astrom();
26468
26469
26470 /* The transformation parameters. */
26471 double eo = jauApci13(date1, date2, astrom);
26472
26473 /* ICRS (epoch J2000.0) to CIRS. */
26474 SphericalCoordinate co = jauAtciq(rc, dc, pr, pd, px, rv, astrom);
26475
26476 return new SphericalCoordinateEO(co, eo);
26477 /* Finished. */
26478
26479
26480 }
26481
26482 /**
26483 * Quick ICRS, epoch J2000.0, to CIRS transformation, given precomputed
26484 * star-independent astrometry parameters.
26485 *
26486 * Use of this function is appropriate when efficiency is important and
26487 * where many star positions are to be transformed for one date. The
26488 * star-independent parameters can be obtained by calling one of the
26489 * functions iauApci[13], iauApcg[13], iauApco[13] or iauApcs[13].
26490 *
26491 * If the parallax and proper motions are zero the iauAtciqz function
26492 * can be used instead.
26493 *
26494 *<p>This function is derived from the International Astronomical Union's
26495 * SOFA (Standards of Fundamental Astronomy) software collection.
26496 *
26497 *<p>Status: support function.
26498 *
26499 *<!-- Given: -->
26500 * @param rc double ICRS RA,Dec at J2000.0 (radians)
26501 * @param dc double ICRS RA,Dec at J2000.0 (radians)
26502 * @param pr double RA proper motion (radians/year; Note 3)
26503 * @param pd double Dec proper motion (radians/year)
26504 * @param px double parallax (arcsec)
26505 * @param rv double radial velocity (km/s, +ve if receding)
26506 * @param astrom star-independent astrometry parameters:
26507 *
26508 *<!-- Returned:-->
26509 * @return double <b>Returned</b> CIRS RA,Dec (radians)
26510 *
26511 *<p>Notes:
26512 * <ol>
26513 *
26514 * <li> All the vectors are with respect to BCRS axes.
26515 *
26516 * <li> Star data for an epoch other than J2000.0 (for example from the
26517 * Hipparcos catalog, which has an epoch of J1991.25) will require a
26518 * preliminary call to iauPmsafe before use.
26519 *
26520 * <li> The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt.
26521 *
26522 * </ol>
26523 * Called:
26524 * <ul>
26525 * <li>{@link #jauPmpx} proper motion and parallax
26526 * <li>{@link #jauLdsun} light deflection by the Sun
26527 * <li>{@link #jauAb} stellar aberration
26528 * <li>{@link #jauRxp} product of r-matrix and pv-vector
26529 * <li>{@link #jauC2s} p-vector to spherical
26530 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
26531 *
26532 * </ul>
26533 *@version 2013 October 9
26534 *
26535 *@since JSOFA release 20131202
26536 *
26537 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
26538 */
26539 public static SphericalCoordinate jauAtciq(double rc, double dc,
26540 double pr, double pd, double px, double rv,
26541 Astrom astrom)
26542 {
26543 double pco[], pnat[], ppr[], pi[];
26544
26545
26546 /* Proper motion and parallax, giving BCRS coordinate direction. */
26547 pco = jauPmpx(rc, dc, pr, pd, px, rv, astrom.pmt, astrom.eb);
26548
26549 /* Light deflection by the Sun, giving BCRS natural direction. */
26550 pnat = jauLdsun(pco, astrom.eh, astrom.em);
26551
26552 /* Aberration, giving GCRS proper direction. */
26553 ppr = jauAb(pnat, astrom.v, astrom.em, astrom.bm1);
26554
26555 /* Bias-precession-nutation, giving CIRS proper direction. */
26556 pi = jauRxp(astrom.bpn, ppr);
26557
26558 /* CIRS RA,Dec. */
26559 SphericalCoordinate co = jauC2s(pi);
26560 co.alpha = jauAnp(co.alpha);
26561
26562 return co;
26563 /* Finished. */
26564
26565
26566 }
26567
26568 /**
26569 * Quick ICRS, epoch J2000.0, to CIRS transformation, given precomputed
26570 * star-independent astrometry parameters plus a list of light-
26571 * deflecting bodies.
26572 *
26573 * Use of this function is appropriate when efficiency is important and
26574 * where many star positions are to be transformed for one date. The
26575 * star-independent parameters can be obtained by calling one of the
26576 * functions iauApci[13], iauApcg[13], iauApco[13] or iauApcs[13].
26577 *
26578 *
26579 * If the only light-deflecting body to be taken into account is the
26580 * Sun, the iauAtciq function can be used instead. If in addition the
26581 * parallax and proper motions are zero, the iauAtciqz function can be
26582 * used.
26583 *
26584 *<p>This function is derived from the International Astronomical Union's
26585 * SOFA (Standards of Fundamental Astronomy) software collection.
26586 *
26587 *<p>Status: support function.
26588 *
26589 *<!-- Given: -->
26590 * @param rc double ICRS RA,Dec at J2000.0 (radians)
26591 * @param dc double ICRS RA,Dec at J2000.0 (radians)
26592 * @param pr double RA proper motion (radians/year; Note 3)
26593 * @param pd double Dec proper motion (radians/year)
26594 * @param px double parallax (arcsec)
26595 * @param rv double radial velocity (km/s, +ve if receding)
26596 * @param astrom star-independent astrometry parameters:
26597 * @param n int number of bodies (Note 3)
26598 * @param b jauLDBODY[n] data for each of the n bodies (Notes 3,4):
26599 *
26600 *<!-- Returned:-->
26601 * @return ri,di double <b>Returned</b> CIRS RA,Dec (radians)
26602 *
26603 *<p>Notes:
26604 * <ol>
26605 *
26606 * <li> Star data for an epoch other than J2000.0 (for example from the
26607 * Hipparcos catalog, which has an epoch of J1991.25) will require a
26608 * preliminary call to iauPmsafe before use.
26609 *
26610 * <li> The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt.
26611 *
26612 * <li> The struct b contains n entries, one for each body to be
26613 * considered. If n = 0, no gravitational light deflection will be
26614 * applied, not even for the Sun.
26615 *
26616 * <li> The struct b should include an entry for the Sun as well as for
26617 * any planet or other body to be taken into account. The entries
26618 * should be in the order in which the light passes the body.
26619 *
26620 * <li> In the entry in the b struct for body i, the mass parameter
26621 * b[i].bm can, as required, be adjusted in order to allow for such
26622 * effects as quadrupole field.
26623 *
26624 * <li> The deflection limiter parameter b[i].dl is phi^2/2, where phi is
26625 * the angular separation (in radians) between star and body at
26626 * which limiting is applied. As phi shrinks below the chosen
26627 * threshold, the deflection is artificially reduced, reaching zero
26628 * for phi = 0. Example values suitable for a terrestrial
26629 * observer, together with masses, are as follows:
26630 * <pre>
26631 * body i b[i].bm b[i].dl
26632 *
26633 * Sun 1.0 6e-6
26634 * Jupiter 0.00095435 3e-9
26635 * Saturn 0.00028574 3e-10
26636 * </pre>
26637 * <li> For efficiency, validation of the contents of the b array is
26638 * omitted. The supplied masses must be greater than zero, the
26639 * position and velocity vectors must be right, and the deflection
26640 * limiter greater than zero.
26641 *
26642 * </ol>
26643 * Called:
26644 * <ul>
26645 * <li>{@link #jauPmpx} proper motion and parallax
26646 * <li>{@link #jauLdn} light deflection by n bodies
26647 * <li>{@link #jauAb} stellar aberration
26648 * <li>{@link #jauRxp} product of r-matrix and pv-vector
26649 * <li>{@link #jauC2s} p-vector to spherical
26650 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
26651 *
26652 * </ul>
26653 *@version 2013 October 9
26654 *
26655 *@since JSOFA release 20131202
26656 *
26657 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
26658 */
26659 public static SphericalCoordinate jauAtciqn(double rc, double dc, double pr, double pd,
26660 double px, double rv, Astrom astrom,
26661 int n, Ldbody b[])
26662 {
26663 double pco[], pnat[], ppr[] = new double[3], pi[] = new double[3];
26664
26665
26666 /* Proper motion and parallax, giving BCRS coordinate direction. */
26667 pco = jauPmpx(rc, dc, pr, pd, px, rv, astrom.pmt, astrom.eb);
26668
26669 /* Light deflection, giving BCRS natural direction. */
26670 pnat = jauLdn(n, b, astrom.eb, pco);
26671
26672 /* Aberration, giving GCRS proper direction. */
26673 ppr = jauAb(pnat, astrom.v, astrom.em, astrom.bm1);
26674
26675 /* Bias-precession-nutation, giving CIRS proper direction. */
26676 pi = jauRxp(astrom.bpn, ppr);
26677
26678 /* CIRS RA,Dec. */
26679 SphericalCoordinate co = jauC2s(pi);
26680 co.alpha = jauAnp(co.alpha);
26681
26682 return co;
26683 /* Finished. */
26684
26685
26686 }
26687
26688 /**
26689 * Quick ICRS to CIRS transformation, given precomputed star-
26690 * independent astrometry parameters, and assuming zero parallax and
26691 * proper motion.
26692 *
26693 * Use of this function is appropriate when efficiency is important and
26694 * where many star positions are to be transformed for one date. The
26695 * star-independent parameters can be obtained by calling one of the
26696 * functions iauApci[13], iauApcg[13], iauApco[13] or iauApcs[13].
26697 *
26698 * The corresponding function for the case of non-zero parallax and
26699 * proper motion is iauAtciq.
26700 *
26701 *<p>This function is derived from the International Astronomical Union's
26702 * SOFA (Standards of Fundamental Astronomy) software collection.
26703 *
26704 *<p>Status: support function.
26705 *
26706 *<!-- Given: -->
26707 * @param rc double ICRS astrometric RA,Dec (radians)
26708 * @param dc double ICRS astrometric RA,Dec (radians)
26709 * @param astrom star-independent astrometry parameters:
26710 *
26711 *<!-- Returned:-->
26712 * @return ri,di double <b>Returned</b> CIRS RA,Dec (radians)
26713 *
26714 * Note:
26715 *
26716 * @return All the <b>Returned</b> vectors are with respect to BCRS axes.
26717 *
26718 *<p>References:
26719 * <ul>
26720 *
26721 * <li> Urban, S. & Seidelmann, P. K. (eds), Explanatory Supplement to
26722 * the Astronomical Almanac, 3rd ed., University Science Books
26723 * (2013).
26724 *
26725 * <li> Klioner, Sergei A., "A practical relativistic model for micro-
26726 * arcsecond astrometry in space", Astr. J. 125, 1580-1597 (2003).
26727 *
26728 * </ul>
26729 * Called:
26730 * <ul>
26731 * <li>{@link #jauS2c} spherical coordinates to unit vector
26732 * <li>{@link #jauLdsun} light deflection due to Sun
26733 * <li>{@link #jauAb} stellar aberration
26734 * <li>{@link #jauRxp} product of r-matrix and p-vector
26735 * <li>{@link #jauC2s} p-vector to spherical
26736 * <li>{@link #jauAnp} normalize angle into range +/- pi
26737 *
26738 * </ul>
26739 *@version 2013 October 9
26740 *
26741 *@since JSOFA release 20131202
26742 *
26743 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
26744 */
26745 public static SphericalCoordinate jauAtciqz(double rc, double dc, Astrom astrom)
26746 {
26747 double pco[], pnat[], ppr[] = new double[3], pi[];
26748
26749
26750 /* BCRS coordinate direction (unit vector). */
26751 pco = jauS2c(rc, dc);
26752
26753 /* Light deflection by the Sun, giving BCRS natural direction. */
26754 pnat = jauLdsun(pco, astrom.eh, astrom.em);
26755
26756 /* Aberration, giving GCRS proper direction. */
26757 ppr = jauAb(pnat, astrom.v, astrom.em, astrom.bm1);
26758
26759 /* Bias-precession-nutation, giving CIRS proper direction. */
26760 pi = jauRxp(astrom.bpn, ppr);
26761
26762 /* CIRS RA,Dec. */
26763 SphericalCoordinate co = jauC2s(pi);
26764 co.alpha = jauAnp(co.alpha);
26765
26766 return co;
26767 /* Finished. */
26768
26769
26770 }
26771
26772 /**
26773 * ICRS RA,Dec to observed place. The caller supplies UTC, site
26774 * coordinates, ambient air conditions and observing wavelength.
26775 *
26776 * SOFA models are used for the Earth ephemeris, bias-precession-
26777 * nutation, Earth orientation and refraction.
26778 *
26779 *<p>This function is derived from the International Astronomical Union's
26780 * SOFA (Standards of Fundamental Astronomy) software collection.
26781 *
26782 *<p>Status: support function.
26783 *
26784 *<!-- Given: -->
26785 * @param rc double ICRS right ascension at J2000.0 (radians, Note 1)
26786 * @param dc double ICRS right ascension at J2000.0 (radians, Note 1)
26787 * @param pr double RA proper motion (radians/year; Note 2)
26788 * @param pd double Dec proper motion (radians/year)
26789 * @param px double parallax (arcsec)
26790 * @param rv double radial velocity (km/s, +ve if receding)
26791 * @param utc1 double UTC as a 2-part...
26792 * @param utc2 double ...quasi Julian Date (Notes 3-4)
26793 * @param dut1 double UT1-UTC (seconds, Note 5)
26794 * @param elong double longitude (radians, east +ve, Note 6)
26795 * @param phi double latitude (geodetic, radians, Note 6)
26796 * @param hm double height above ellipsoid (m, geodetic, Notes 6,8)
26797 * @param xp double polar motion coordinates (radians, Note 7)
26798 * @param yp double polar motion coordinates (radians, Note 7)
26799 * @param phpa double pressure at the observer (hPa = mB, Note 8)
26800 * @param tc double ambient temperature at the observer (deg C)
26801 * @param rh double relative humidity at the observer (range 0-1)
26802 * @param wl double wavelength (micrometers, Note 9)
26803 *
26804 *<!-- Returned:-->
26805 * @return aob double* <b>Returned</b> observed azimuth (radians: N=0,E=90)
26806 * zob double* <b>Returned</b> observed zenith distance (radians)
26807 * hob double* <b>Returned</b> observed hour angle (radians)
26808 * dob double* <b>Returned</b> observed declination (radians)
26809 * rob double* <b>Returned</b> observed right ascension (CIO-based, radians)
26810 * eo double* <b>Returned</b> equation of the origins (ERA-GST)
26811 *
26812 * @throws JSOFAInternalError an internal error has occured
26813 * @throws JSOFAIllegalParameter
26814 * int status: <b>Returned</b> +1 = dubious year (Note 4)
26815 * 0 = <b>Returned</b> OK
26816 * -1 = <b>Returned</b> unacceptable date
26817 *
26818 *<p>Notes:
26819 * <ol>
26820 *
26821 * <li> Star data for an epoch other than J2000.0 (for example from the
26822 * Hipparcos catalog, which has an epoch of J1991.25) will require
26823 * a preliminary call to iauPmsafe before use.
26824 *
26825 * <li> The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt.
26826 *
26827 * <li> utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any
26828 * convenient way between the two arguments, for example where utc1
26829 * is the Julian Day Number and utc2 is the fraction of a day.
26830 *
26831 * <p>However, JD cannot unambiguously represent UTC during a leap
26832 * second unless special measures are taken. The convention in the
26833 * present function is that the JD day represents UTC days whether
26834 * the length is 86399, 86400 or 86401 SI seconds.
26835 *
26836 * <p>Applications should use the function iauDtf2d to convert from
26837 * calendar date and time of day into 2-part quasi Julian Date, as
26838 * it implements the leap-second-ambiguity convention just
26839 * described.
26840 *
26841 * <li> The warning status "dubious year" flags UTCs that predate the
26842 * introduction of the time scale or that are too far in the
26843 * future to be trusted. See iauDat for further details.
26844 *
26845 * <li> UT1-UTC is tabulated in IERS bulletins. It increases by exactly
26846 * one second at the end of each positive UTC leap second,
26847 * introduced in order to keep UT1-UTC within +/- 0.9s. n.b. This
26848 * practice is under review, and in the future UT1-UTC may grow
26849 * essentially without limit.
26850 *
26851 * <li> The geographical coordinates are with respect to the WGS84
26852 * reference ellipsoid. TAKE CARE WITH THE LONGITUDE SIGN: the
26853 * longitude required by the present function is east-positive
26854 * (i.e. right-handed), in accordance with geographical convention.
26855 *
26856 * <li> The polar motion xp,yp can be obtained from IERS bulletins. The
26857 * values are the coordinates (in radians) of the Celestial
26858 * Intermediate Pole with respect to the International Terrestrial
26859 * Reference System (see IERS Conventions 2003), measured along the
26860 * meridians 0 and 90 deg west respectively. For many
26861 * applications, xp and yp can be set to zero.
26862 *
26863 * <li> If hm, the height above the ellipsoid of the observing station
26864 * in meters, is not known but phpa, the pressure in hPa (=mB),
26865 * is available, an adequate estimate of hm can be obtained from
26866 * the expression
26867 *
26868 * <p>hm = -29.3 * tsl * log ( phpa / 1013.25 );
26869 *
26870 * <p>where tsl is the approximate sea-level air temperature in K
26871 * (See Astrophysical Quantities, C.W.Allen, 3rd edition, section
26872 * 52). Similarly, if the pressure phpa is not known, it can be
26873 * estimated from the height of the observing station, hm, as
26874 * follows:
26875 *
26876 * <p>phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) );
26877 *
26878 * <p>Note, however, that the refraction is nearly proportional to
26879 * the pressure and that an accurate phpa value is important for
26880 * precise work.
26881 *
26882 * <li> The argument wl specifies the observing wavelength in
26883 * micrometers. The transition from optical to radio is assumed to
26884 * occur at 100 micrometers (about 3000 GHz).
26885 *
26886 * <li> The accuracy of the result is limited by the corrections for
26887 * refraction, which use a simple A*tan(z) + B*tan^3(z) model.
26888 * Providing the meteorological parameters are known accurately and
26889 * there are no gross local effects, the predicted observed
26890 * coordinates should be within 0.05 arcsec (optical) or 1 arcsec
26891 * (radio) for a zenith distance of less than 70 degrees, better
26892 * than 30 arcsec (optical or radio) at 85 degrees and better
26893 * than 20 arcmin (optical) or 30 arcmin (radio) at the horizon.
26894 *
26895 * <p>Without refraction, the complementary functions iauAtco13 and
26896 * iauAtoc13 are self-consistent to better than 1 microarcsecond
26897 * all over the celestial sphere. With refraction included,
26898 * consistency falls off at high zenith distances, but is still
26899 * better than 0.05 arcsec at 85 degrees.
26900 *
26901 * <li> "Observed" Az,ZD means the position that would be seen by a
26902 * perfect geodetically aligned theodolite. (Zenith distance is
26903 * used rather than altitude in order to reflect the fact that no
26904 * allowance is made for depression of the horizon.) This is
26905 * related to the observed HA,Dec via the standard rotation, using
26906 * the geodetic latitude (corrected for polar motion), while the
26907 * observed HA and RA are related simply through the Earth rotation
26908 * angle and the site longitude. "Observed" RA,Dec or HA,Dec thus
26909 * means the position that would be seen by a perfect equatorial
26910 * with its polar axis aligned to the Earth's axis of rotation.
26911 *
26912 * <li> It is advisable to take great care with units, as even unlikely
26913 * values of the input parameters are accepted and processed in
26914 * accordance with the models used.
26915 *
26916 * </ol>
26917 * Called:
26918 * <ul>
26919 * <li>{@link #jauApco13} astrometry parameters, ICRS-observed, 2013
26920 * <li>{@link #jauAtciq} quick ICRS to CIRS
26921 * <li>{@link #jauAtioq} quick ICRS to observed
26922 *
26923 * </ul>
26924 *@version 2013 October 9
26925 *
26926 *@since JSOFA release 20131202
26927 *
26928 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
26929 * @throws JSOFAInternalError an internal error has occured
26930 * @throws JSOFAIllegalParameter
26931 */
26932 public static ObservedPositionEO jauAtco13(double rc, double dc,
26933 double pr, double pd, double px, double rv,
26934 double utc1, double utc2, double dut1,
26935 double elong, double phi, double hm, double xp, double yp,
26936 double phpa, double tc, double rh, double wl) throws JSOFAIllegalParameter, JSOFAInternalError
26937 {
26938 Astrom astrom = new Astrom();
26939
26940
26941 /* Star-independent astrometry parameters. */
26942 double eo = jauApco13(utc1, utc2, dut1, elong, phi, hm, xp, yp,
26943 phpa, tc, rh, wl, astrom);
26944
26945 /* Transform ICRS to CIRS. */
26946 SphericalCoordinate co = jauAtciq(rc, dc, pr, pd, px, rv, astrom);
26947
26948 /* Transform CIRS to observed. */
26949 ObservedPosition obs = jauAtioq(co.alpha, co.delta, astrom);
26950
26951
26952 return new ObservedPositionEO(obs, eo);
26953
26954 /* Finished. */
26955
26956
26957 }
26958
26959 /**
26960 * Transform star RA,Dec from geocentric CIRS to ICRS astrometric.
26961 *
26962 *<p>This function is derived from the International Astronomical Union's
26963 * SOFA (Standards of Fundamental Astronomy) software collection.
26964 *
26965 *<p>Status: support function.
26966 *
26967 *<!-- Given: -->
26968 * @param ri double CIRS geocentric RA,Dec (radians)
26969 * @param di double CIRS geocentric RA,Dec (radians)
26970 * @param date1 double TDB as a 2-part...
26971 * @param date2 double ...Julian Date (Note 1)
26972 *
26973 *<!-- Returned:-->
26974 * @return rc,dc double <b>Returned</b> ICRS astrometric RA,Dec (radians)
26975 * eo double <b>Returned</b> equation of the origins (ERA-GST, Note 4)
26976 *
26977 *<p>Notes:
26978 * <ol>
26979 *
26980 * <li> The TDB date date1+date2 is a Julian Date, apportioned in any
26981 * convenient way between the two arguments. For example,
26982 * JD(TDB)=2450123.7 could be expressed in any of these ways, among
26983 * others:
26984 *
26985 * date1 date2
26986 *
26987 * 2450123.7 0.0 (JD method)
26988 * 2451545.0 -1421.3 (J2000 method)
26989 * 2400000.5 50123.2 (MJD method)
26990 * 2450123.5 0.2 (date & time method)
26991 *
26992 * <p>The JD method is the most natural and convenient to use in cases
26993 * where the loss of several decimal digits of resolution is
26994 * acceptable. The J2000 method is best matched to the way the
26995 * argument is handled internally and will deliver the optimum
26996 * resolution. The MJD method and the date & time methods are both
26997 * good compromises between resolution and convenience. For most
26998 * applications of this function the choice will not be at all
26999 * critical.
27000 *
27001 * <p>TT can be used instead of TDB without any significant impact on
27002 * accuracy.
27003 *
27004 * <li> Iterative techniques are used for the aberration and light
27005 * deflection corrections so that the functions iauAtic13 (or
27006 * iauAticq) and iauAtci13 (or iauAtciq) are accurate inverses;
27007 * even at the edge of the Sun's disk the discrepancy is only about
27008 * 1 nanoarcsecond.
27009 *
27010 * <li> The available accuracy is better than 1 milliarcsecond, limited
27011 * mainly by the precession-nutation model that is used, namely
27012 * IAU 2000A/2006. Very close to solar system bodies, additional
27013 * errors of up to several milliarcseconds can occur because of
27014 * unmodeled light deflection; however, the Sun's contribution is
27015 * taken into account, to first order. The accuracy limitations of
27016 * the SOFA function iauEpv00 (used to compute Earth position and
27017 * velocity) can contribute aberration errors of up to
27018 * 5 microarcseconds. Light deflection at the Sun's limb is
27019 * uncertain at the 0.4 mas level.
27020 *
27021 * <li> Should the transformation to (equinox based) J2000.0 mean place
27022 * be required rather than (CIO based) ICRS coordinates, subtract the
27023 * equation of the origins from the returned right ascension:
27024 * RA = RI - EO. (The iauAnp function can then be applied, as
27025 * required, to keep the result in the conventional 0-2pi range.)
27026 *
27027 * </ol>
27028 * Called:
27029 * <ul>
27030 * <li>{@link #jauApci13} astrometry parameters, ICRS-CIRS, 2013
27031 * <li>{@link #jauAticq} quick CIRS to ICRS astrometric
27032 *
27033 * </ul>
27034 *@version 2013 October 9
27035 *
27036 *@since JSOFA release 20131202
27037 *
27038 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
27039 */
27040 public static SphericalCoordinateEO jauAtic13(double ri, double di, double date1, double date2)
27041 {
27042 /* Star-independent astrometry parameters */
27043 Astrom astrom = new Astrom();
27044
27045
27046 /* Star-independent astrometry parameters. */
27047 double eo = jauApci13(date1, date2, astrom);
27048
27049 /* CIRS to ICRS astrometric. */
27050 SphericalCoordinate co = jauAticq(ri, di, astrom);
27051
27052 return new SphericalCoordinateEO(co,eo);
27053 /* Finished. */
27054
27055
27056 }
27057
27058 /**
27059 * Quick CIRS RA,Dec to ICRS astrometric place, given the star-
27060 * independent astrometry parameters.
27061 *
27062 * Use of this function is appropriate when efficiency is important and
27063 * where many star positions are all to be transformed for one date.
27064 * The star-independent astrometry parameters can be obtained by
27065 * calling one of the functions iauApci[13], iauApcg[13], iauApco[13]
27066 * or iauApcs[13].
27067 *
27068 *<p>This function is derived from the International Astronomical Union's
27069 * SOFA (Standards of Fundamental Astronomy) software collection.
27070 *
27071 *<p>Status: support function.
27072 *
27073 *<!-- Given: -->
27074 * @param ri double CIRS RA,Dec (radians)
27075 * @param di double CIRS RA,Dec (radians)
27076 * @param astrom star-independent astrometry parameters:
27077 *
27078 *<!-- Returned:-->
27079 * @return rc,dc double <b>Returned</b> ICRS astrometric RA,Dec (radians)
27080 *
27081 *<p>Notes:
27082 * <ol>
27083 *
27084 * <li> Only the Sun is taken into account in the light deflection
27085 * correction.
27086 *
27087 * <li> Iterative techniques are used for the aberration and light
27088 * deflection corrections so that the functions iauAtic13 (or
27089 * iauAticq) and iauAtci13 (or iauAtciq) are accurate inverses;
27090 * even at the edge of the Sun's disk the discrepancy is only about
27091 * 1 nanoarcsecond.
27092 *
27093 * </ol>
27094 * Called:
27095 * <ul>
27096 * <li>{@link #jauS2c} spherical coordinates to unit vector
27097 * <li>{@link #jauTrxp} product of transpose of r-matrix and p-vector
27098 * <li>{@link #jauZp} zero p-vector
27099 * <li>{@link #jauAb} stellar aberration
27100 * <li>{@link #jauLdsun} light deflection by the Sun
27101 * <li>{@link #jauC2s} p-vector to spherical
27102 * <li>{@link #jauAnp} normalize angle into range +/- pi
27103 *
27104 * </ul>
27105 *@version 2013 October 9
27106 *
27107 *@since JSOFA release 20131202
27108 *
27109 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
27110 */
27111 public static SphericalCoordinate jauAticq(double ri, double di, Astrom astrom )
27112 {
27113 int j, i;
27114 double pi[] , ppr[], pnat[] = new double[3], pco[] = new double[3], w, d[] = new double[3],
27115 before[] = new double[3], r2, r,
27116 after[];
27117
27118
27119 /* CIRS RA,Dec to Cartesian. */
27120 pi = jauS2c(ri, di);
27121
27122 /* Bias-precession-nutation, giving GCRS proper direction. */
27123 ppr = jauTrxp(astrom.bpn, pi);
27124
27125 /* Aberration, giving GCRS natural direction. */
27126 jauZp(d);
27127 for (j = 0; j < 2; j++) {
27128 r2 = 0.0;
27129 for (i = 0; i < 3; i++) {
27130 w = ppr[i] - d[i];
27131 before[i] = w;
27132 r2 += w*w;
27133 }
27134 r = sqrt(r2);
27135 for (i = 0; i < 3; i++) {
27136 before[i] /= r;
27137 }
27138 after = jauAb(before, astrom.v, astrom.em, astrom.bm1);
27139 r2 = 0.0;
27140 for (i = 0; i < 3; i++) {
27141 d[i] = after[i] - before[i];
27142 w = ppr[i] - d[i];
27143 pnat[i] = w;
27144 r2 += w*w;
27145 }
27146 r = sqrt(r2);
27147 for (i = 0; i < 3; i++) {
27148 pnat[i] /= r;
27149 }
27150 }
27151
27152 /* Light deflection by the Sun, giving BCRS coordinate direction. */
27153 jauZp(d);
27154 for (j = 0; j < 5; j++) {
27155 r2 = 0.0;
27156 for (i = 0; i < 3; i++) {
27157 w = pnat[i] - d[i];
27158 before[i] = w;
27159 r2 += w*w;
27160 }
27161 r = sqrt(r2);
27162 for (i = 0; i < 3; i++) {
27163 before[i] /= r;
27164 }
27165 after = jauLdsun(before, astrom.eh, astrom.em);
27166 r2 = 0.0;
27167 for (i = 0; i < 3; i++) {
27168 d[i] = after[i] - before[i];
27169 w = pnat[i] - d[i];
27170 pco[i] = w;
27171 r2 += w*w;
27172 }
27173 r = sqrt(r2);
27174 for (i = 0; i < 3; i++) {
27175 pco[i] /= r;
27176 }
27177 }
27178
27179 /* ICRS astrometric RA,Dec. */
27180 SphericalCoordinate co = jauC2s(pco);
27181 co.alpha = jauAnp(co.alpha);
27182
27183 return co;
27184 /* Finished. */
27185
27186
27187 }
27188
27189 /**
27190 * Quick CIRS to ICRS astrometric place transformation, given the star-
27191 * independent astrometry parameters plus a list of light-deflecting
27192 * bodies.
27193 *
27194 * Use of this function is appropriate when efficiency is important and
27195 * where many star positions are all to be transformed for one date.
27196 * The star-independent astrometry parameters can be obtained by
27197 * calling one of the functions iauApci[13], iauApcg[13], iauApco[13]
27198 * or iauApcs[13].
27199 *
27200 * If the only light-deflecting body to be taken into account is the
27201 * Sun, the iauAticq function can be used instead.
27202 *
27203 *<p>This function is derived from the International Astronomical Union's
27204 * SOFA (Standards of Fundamental Astronomy) software collection.
27205 *
27206 *<p>Status: support function.
27207 *
27208 *<!-- Given: -->
27209 * @param ri double CIRS RA,Dec (radians)
27210 * @param di double CIRS RA,Dec (radians)
27211 * @param astrom star-independent astrometry parameters:
27212 * @param n number of bodies.
27213 * @param b[] data for each of the n bodies.
27214 *
27215 *<!-- Returned:-->
27216 * @return ICRS astrometric RA,Dec (radians)
27217 *
27218 *<p>Notes:
27219 * <ol>
27220 *
27221 * <li> Iterative techniques are used for the aberration and light
27222 * deflection corrections so that the functions iauAticqn and
27223 * iauAtciqn are accurate inverses; even at the edge of the Sun's
27224 * disk the discrepancy is only about 1 nanoarcsecond.
27225 *
27226 * <li> If the only light-deflecting body to be taken into account is the
27227 * Sun, the iauAticq function can be used instead.
27228 *
27229 * <li> The struct b contains n entries, one for each body to be
27230 * considered. If n = 0, no gravitational light deflection will be
27231 * applied, not even for the Sun.
27232 *
27233 * <li> The struct b should include an entry for the Sun as well as for
27234 * any planet or other body to be taken into account. The entries
27235 * should be in the order in which the light passes the body.
27236 *
27237 * <li> In the entry in the b struct for body i, the mass parameter
27238 * b[i].bm can, as required, be adjusted in order to allow for such
27239 * effects as quadrupole field.
27240 *
27241 * <li> The deflection limiter parameter b[i].dl is phi^2/2, where phi is
27242 * the angular separation (in radians) between star and body at
27243 * which limiting is applied. As phi shrinks below the chosen
27244 * threshold, the deflection is artificially reduced, reaching zero
27245 * for phi = 0. Example values suitable for a terrestrial
27246 * observer, together with masses, are as follows:
27247 *
27248 * <p>body i b[i].bm b[i].dl
27249 *
27250 * <p>Sun 1.0 6e-6
27251 * Jupiter 0.00095435 3e-9
27252 * Saturn 0.00028574 3e-10
27253 *
27254 * <li> For efficiency, validation of the contents of the b array is
27255 * omitted. The supplied masses must be greater than zero, the
27256 * position and velocity vectors must be right, and the deflection
27257 * limiter greater than zero.
27258 *
27259 * </ol>
27260 * Called:
27261 * <ul>
27262 * <li>{@link #jauS2c} spherical coordinates to unit vector
27263 * <li>{@link #jauTrxp} product of transpose of r-matrix and p-vector
27264 * <li>{@link #jauZp} zero p-vector
27265 * <li>{@link #jauAb} stellar aberration
27266 * <li>{@link #jauLdn} light deflection by n bodies
27267 * <li>{@link #jauC2s} p-vector to spherical
27268 * <li>{@link #jauAnp} normalize angle into range +/- pi
27269 *
27270 * </ul>
27271 *@version 2013 October 9
27272 *
27273 *@since JSOFA release 20131202
27274 *
27275 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
27276 */
27277 public static SphericalCoordinate jauAticqn(double ri, double di, Astrom astrom,
27278 int n, Ldbody b[])
27279 {
27280 int j, i;
27281 double pi[], ppr[], pnat[] = new double[3], pco[] = new double[3], w, d[] = new double[3], before[] = new double[3], r2, r,
27282 after[];
27283
27284
27285 /* CIRS RA,Dec to Cartesian. */
27286 pi = jauS2c(ri, di);
27287
27288 /* Bias-precession-nutation, giving GCRS proper direction. */
27289 ppr = jauTrxp(astrom.bpn, pi);
27290
27291 /* Aberration, giving GCRS natural direction. */
27292 jauZp(d);
27293 for (j = 0; j < 2; j++) {
27294 r2 = 0.0;
27295 for (i = 0; i < 3; i++) {
27296 w = ppr[i] - d[i];
27297 before[i] = w;
27298 r2 += w*w;
27299 }
27300 r = sqrt(r2);
27301 for (i = 0; i < 3; i++) {
27302 before[i] /= r;
27303 }
27304 after = jauAb(before, astrom.v, astrom.em, astrom.bm1);
27305 r2 = 0.0;
27306 for (i = 0; i < 3; i++) {
27307 d[i] = after[i] - before[i];
27308 w = ppr[i] - d[i];
27309 pnat[i] = w;
27310 r2 += w*w;
27311 }
27312 r = sqrt(r2);
27313 for (i = 0; i < 3; i++) {
27314 pnat[i] /= r;
27315 }
27316 }
27317
27318 /* Light deflection, giving BCRS coordinate direction. */
27319 jauZp(d);
27320 for (j = 0; j < 5; j++) {
27321 r2 = 0.0;
27322 for (i = 0; i < 3; i++) {
27323 w = pnat[i] - d[i];
27324 before[i] = w;
27325 r2 += w*w;
27326 }
27327 r = sqrt(r2);
27328 for (i = 0; i < 3; i++) {
27329 before[i] /= r;
27330 }
27331 after = jauLdn(n, b, astrom.eb, before);
27332 r2 = 0.0;
27333 for (i = 0; i < 3; i++) {
27334 d[i] = after[i] - before[i];
27335 w = pnat[i] - d[i];
27336 pco[i] = w;
27337 r2 += w*w;
27338 }
27339 r = sqrt(r2);
27340 for (i = 0; i < 3; i++) {
27341 pco[i] /= r;
27342 }
27343 }
27344
27345 /* ICRS astrometric RA,Dec. */
27346 SphericalCoordinate co = jauC2s(pco);
27347 co.alpha = jauAnp(co.alpha);
27348
27349 return co;
27350 /* Finished. */
27351
27352
27353 }
27354
27355 /**
27356 * Observed Position.
27357 * "Observed" Az,ZD means the position that would be seen by a
27358 * perfect geodetically aligned theodolite. (Zenith distance is
27359 * used rather than altitude in order to reflect the fact that no
27360 * allowance is made for depression of the horizon.) This is
27361 * related to the observed HA,Dec via the standard rotation, using
27362 * the geodetic latitude (corrected for polar motion), while the
27363 * observed HA and RA are related simply through the Earth rotation
27364 * angle and the site longitude. "Observed" RA,Dec or HA,Dec thus
27365 * means the position that would be seen by a perfect equatorial
27366 * with its polar axis aligned to the Earth's axis of rotation..
27367 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 28 Mar 2014
27368 * @version $Revision$ $date$
27369 */
27370 public static class ObservedPosition{
27371 /** observed azimuth (radians: N=0,E=90) */
27372 public double aob;
27373
27374 /** observed zenith distance (radians) */
27375 public double zob;
27376
27377 /** observed Hour Angle (radians) */
27378 public double hob;
27379
27380 /** observed Declination (radians) */
27381 public double dob;
27382
27383 /** observed Right Ascension (radians) */
27384 public double rob;
27385 public ObservedPosition(double aob,
27386 double zob,
27387 double hob,
27388 double dob,
27389 double rob
27390 ) {
27391 this.aob = aob;
27392 this.zob = zob;
27393 this.hob = hob;
27394 this.dob = dob;
27395 this.rob = rob;
27396 }
27397 }
27398
27399 /**
27400 * Observed position with the equation of the origins.
27401 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 29 Mar 2014
27402 * @version $Revision$ $date$
27403 */
27404 public static class ObservedPositionEO {
27405 /**
27406 * observed position.
27407 */
27408 public ObservedPosition op;
27409 /**
27410 * The equation of the origins. The equation of the origins is the distance between the true
27411 * equinox and the celestial intermediate origin and, equivalently,
27412 * the difference between Earth rotation angle and Greenwich
27413 * apparent sidereal time (ERA-GST). It comprises the precession
27414 * (since J2000.0) in right ascension plus the equation of the
27415 * equinoxes (including the small correction terms).
27416 */
27417 public double eo;
27418 /**
27419 * @param op
27420 * @param eo
27421 */
27422 public ObservedPositionEO(ObservedPosition op, double eo) {
27423 this.op = op;
27424 this.eo = eo;
27425 }
27426
27427 }
27428
27429
27430
27431
27432 /**
27433 * CIRS RA,Dec to observed place. The caller supplies UTC, site
27434 * coordinates, ambient air conditions and observing wavelength.
27435 *
27436 *<p>This function is derived from the International Astronomical Union's
27437 * SOFA (Standards of Fundamental Astronomy) software collection.
27438 *
27439 *<p>Status: support function.
27440 *
27441 *<!-- Given: -->
27442 * @param ri double CIRS right ascension (CIO-based, radians)
27443 * @param di double CIRS declination (radians)
27444 * @param utc1 double UTC as a 2-part...
27445 * @param utc2 double ...quasi Julian Date (Notes 1,2)
27446 * @param dut1 double UT1-UTC (seconds, Note 3)
27447 * @param elong double longitude (radians, east +ve, Note 4)
27448 * @param phi double geodetic latitude (radians, Note 4)
27449 * @param hm double height above ellipsoid (m, geodetic Notes 4,6)
27450 * @param xp double polar motion coordinates (radians, Note 5)
27451 * @param yp double polar motion coordinates (radians, Note 5)
27452 * @param phpa double pressure at the observer (hPa = mB, Note 6)
27453 * @param tc double ambient temperature at the observer (deg C)
27454 * @param rh double relative humidity at the observer (range 0-1)
27455 * @param wl double wavelength (micrometers, Note 7)
27456 *
27457 *<!-- Returned:-->
27458 * @return aob double* <b>Returned</b> observed azimuth (radians: N=0,E=90)
27459 * zob double* <b>Returned</b> observed zenith distance (radians)
27460 * hob double* <b>Returned</b> observed hour angle (radians)
27461 * dob double* <b>Returned</b> observed declination (radians)
27462 * rob double* <b>Returned</b> observed right ascension (CIO-based, radians)
27463 *
27464 * @throws JSOFAInternalError an internal error has occured
27465 * @throws JSOFAIllegalParameter
27466 * int status: <b>Returned</b> +1 = dubious year (Note 2)
27467 * 0 = <b>Returned</b> OK
27468 * -1 = <b>Returned</b> unacceptable date
27469 *
27470 *<p>Notes:
27471 * <ol>
27472 *
27473 * <li> utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any
27474 * convenient way between the two arguments, for example where utc1
27475 * is the Julian Day Number and utc2 is the fraction of a day.
27476 *
27477 * <p>However, JD cannot unambiguously represent UTC during a leap
27478 * second unless special measures are taken. The convention in the
27479 * present function is that the JD day represents UTC days whether
27480 * the length is 86399, 86400 or 86401 SI seconds.
27481 *
27482 * <p>Applications should use the function iauDtf2d to convert from
27483 * calendar date and time of day into 2-part quasi Julian Date, as
27484 * it implements the leap-second-ambiguity convention just
27485 * described.
27486 *
27487 * <li> The warning status "dubious year" flags UTCs that predate the
27488 * introduction of the time scale or that are too far in the
27489 * future to be trusted. See iauDat for further details.
27490 *
27491 * <li> UT1-UTC is tabulated in IERS bulletins. It increases by exactly
27492 * one second at the end of each positive UTC leap second,
27493 * introduced in order to keep UT1-UTC within +/- 0.9s. n.b. This
27494 * practice is under review, and in the future UT1-UTC may grow
27495 * essentially without limit.
27496 *
27497 * <li> The geographical coordinates are with respect to the WGS84
27498 * reference ellipsoid. TAKE CARE WITH THE LONGITUDE SIGN: the
27499 * longitude required by the present function is east-positive
27500 * (i.e. right-handed), in accordance with geographical convention.
27501 *
27502 * <li> The polar motion xp,yp can be obtained from IERS bulletins. The
27503 * values are the coordinates (in radians) of the Celestial
27504 * Intermediate Pole with respect to the International Terrestrial
27505 * Reference System (see IERS Conventions 2003), measured along the
27506 * meridians 0 and 90 deg west respectively. For many
27507 * applications, xp and yp can be set to zero.
27508 *
27509 * <li> If hm, the height above the ellipsoid of the observing station
27510 * in meters, is not known but phpa, the pressure in hPa (=mB), is
27511 * available, an adequate estimate of hm can be obtained from the
27512 * expression
27513 *
27514 * <p>hm = -29.3 * tsl * log ( phpa / 1013.25 );
27515 *
27516 * <p>where tsl is the approximate sea-level air temperature in K
27517 * (See Astrophysical Quantities, C.W.Allen, 3rd edition, section
27518 * 52). Similarly, if the pressure phpa is not known, it can be
27519 * estimated from the height of the observing station, hm, as
27520 * follows:
27521 *
27522 * <p>phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) );
27523 *
27524 * <p>Note, however, that the refraction is nearly proportional to
27525 * the pressure and that an accurate phpa value is important for
27526 * precise work.
27527 *
27528 * <li> The argument wl specifies the observing wavelength in
27529 * micrometers. The transition from optical to radio is assumed to
27530 * occur at 100 micrometers (about 3000 GHz).
27531 *
27532 * <li> "Observed" Az,ZD means the position that would be seen by a
27533 * perfect geodetically aligned theodolite. (Zenith distance is
27534 * used rather than altitude in order to reflect the fact that no
27535 * allowance is made for depression of the horizon.) This is
27536 * related to the observed HA,Dec via the standard rotation, using
27537 * the geodetic latitude (corrected for polar motion), while the
27538 * observed HA and RA are related simply through the Earth rotation
27539 * angle and the site longitude. "Observed" RA,Dec or HA,Dec thus
27540 * means the position that would be seen by a perfect equatorial
27541 * with its polar axis aligned to the Earth's axis of rotation.
27542 *
27543 * <li> The accuracy of the result is limited by the corrections for
27544 * refraction, which use a simple A*tan(z) + B*tan^3(z) model.
27545 * Providing the meteorological parameters are known accurately and
27546 * there are no gross local effects, the predicted astrometric
27547 * coordinates should be within 0.05 arcsec (optical) or 1 arcsec
27548 * (radio) for a zenith distance of less than 70 degrees, better
27549 * than 30 arcsec (optical or radio) at 85 degrees and better
27550 * than 20 arcmin (optical) or 30 arcmin (radio) at the horizon.
27551 *
27552 * <li> The complementary functions iauAtio13 and iauAtoi13 are self-
27553 * consistent to better than 1 microarcsecond all over the
27554 * celestial sphere.
27555 *
27556 * <li> It is advisable to take great care with units, as even unlikely
27557 * values of the input parameters are accepted and processed in
27558 * accordance with the models used.
27559 *
27560 * </ol>
27561 * Called:
27562 * <ul>
27563 * <li>{@link #jauApio13} astrometry parameters, CIRS-observed, 2013
27564 * <li>{@link #jauAtioq} quick CIRS to observed
27565 *
27566 * </ul>
27567 *@version 2013 October 9
27568 *
27569 *@since JSOFA release 20131202
27570 *
27571 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
27572 * @throws JSOFAInternalError an internal error has occured
27573 * @throws JSOFAIllegalParameter
27574 */
27575 public static ObservedPosition jauAtio13(double ri, double di,
27576 double utc1, double utc2, double dut1,
27577 double elong, double phi, double hm, double xp, double yp,
27578 double phpa, double tc, double rh, double wl) throws JSOFAIllegalParameter, JSOFAInternalError
27579 {
27580 Astrom astrom = new Astrom();
27581
27582
27583 /* Star-independent astrometry parameters for CIRS->observed. */
27584 jauApio13(utc1, utc2, dut1, elong, phi, hm, xp, yp,
27585 phpa, tc, rh, wl, astrom);
27586
27587 /* Transform CIRS to observed. */
27588 return jauAtioq(ri, di, astrom);
27589
27590 /* Finished. */
27591
27592
27593 }
27594
27595 /**
27596 * Quick CIRS to observed place transformation.
27597 *
27598 * Use of this function is appropriate when efficiency is important and
27599 * where many star positions are all to be transformed for one date.
27600 * The star-independent astrometry parameters can be obtained by
27601 * calling iauApio[13] or iauApco[13].
27602 *
27603 *<p>This function is derived from the International Astronomical Union's
27604 * SOFA (Standards of Fundamental Astronomy) software collection.
27605 *
27606 *<p>Status: support function.
27607 *
27608 *<!-- Given: -->
27609 * @param ri double CIRS right ascension
27610 * @param di double CIRS declination
27611 * @param astrom star-independent astrometry parameters:
27612 *
27613 *<!-- Returned:-->
27614 * @return aob double* <b>Returned</b> observed azimuth (radians: N=0,E=90)
27615 * zob double* <b>Returned</b> observed zenith distance (radians)
27616 * hob double* <b>Returned</b> observed hour angle (radians)
27617 * dob double* <b>Returned</b> observed declination (radians)
27618 * rob double* <b>Returned</b> observed right ascension (CIO-based, radians)
27619 *
27620 *<p>Notes:
27621 * <ol>
27622 *
27623 * <li> This function returns zenith distance rather than altitude in
27624 * order to reflect the fact that no allowance is made for
27625 * depression of the horizon.
27626 *
27627 * <li> The accuracy of the result is limited by the corrections for
27628 * refraction, which use a simple A*tan(z) + B*tan^3(z) model.
27629 * Providing the meteorological parameters are known accurately and
27630 * there are no gross local effects, the predicted observed
27631 * coordinates should be within 0.05 arcsec (optical) or 1 arcsec
27632 * (radio) for a zenith distance of less than 70 degrees, better
27633 * than 30 arcsec (optical or radio) at 85 degrees and better
27634 * than 20 arcmin (optical) or 30 arcmin (radio) at the horizon.
27635 *
27636 * <p>Without refraction, the complementary functions iauAtioq and
27637 * iauAtoiq are self-consistent to better than 1 microarcsecond all
27638 * over the celestial sphere. With refraction included, consistency
27639 * falls off at high zenith distances, but is still better than
27640 * 0.05 arcsec at 85 degrees.
27641 *
27642 * <li> It is advisable to take great care with units, as even unlikely
27643 * values of the input parameters are accepted and processed in
27644 * accordance with the models used.
27645 *
27646 * <li> The CIRS RA,Dec is obtained from a star catalog mean place by
27647 * allowing for space motion, parallax, the Sun's gravitational lens
27648 * effect, annual aberration and precession-nutation. For star
27649 * positions in the ICRS, these effects can be applied by means of
27650 * the iauAtci13 (etc.) functions. Starting from classical "mean
27651 * place" systems, additional transformations will be needed first.
27652 *
27653 * <li> "Observed" Az,El means the position that would be seen by a
27654 * perfect geodetically aligned theodolite. This is obtained from
27655 * the CIRS RA,Dec by allowing for Earth orientation and diurnal
27656 * aberration, rotating from equator to horizon coordinates, and
27657 * then adjusting for refraction. The HA,Dec is obtained by
27658 * rotating back into equatorial coordinates, and is the position
27659 * that would be seen by a perfect equatorial with its polar axis
27660 * aligned to the Earth's axis of rotation. Finally, the RA is
27661 * obtained by subtracting the HA from the local ERA.
27662 *
27663 * <li> The star-independent CIRS-to-observed-place parameters in ASTROM
27664 * may be computed with iauApio[13] or iauApco[13]. If nothing has
27665 * changed significantly except the time, iauAper[13] may be used to
27666 * perform the requisite adjustment to the astrom structure.
27667 *
27668 * </ol>
27669 * Called:
27670 * <ul>
27671 * <li>{@link #jauS2c} spherical coordinates to unit vector
27672 * <li>{@link #jauC2s} p-vector to spherical
27673 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
27674 *
27675 * </ul>
27676 *@version 2013 December 5
27677 *
27678 *@since JSOFA release 20131202
27679 *
27680 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
27681 */
27682 public static ObservedPosition jauAtioq(double ri, double di, Astrom astrom)
27683 {
27684 /* Minimum cos(alt) and sin(alt) for refraction purposes */
27685 final double CELMIN = 1e-6;
27686 final double SELMIN = 0.05;
27687
27688 double v[] = new double[3], x, y, z, xhd, yhd, zhd, f, xhdt, yhdt, zhdt,
27689 xaet, yaet, zaet, azobs, r, tz, w, del, cosdel,
27690 xaeo, yaeo, zaeo, zdobs, hmobs, dcobs, raobs;
27691
27692 /*--------------------------------------------------------------------*/
27693
27694 /* CIRS RA,Dec to Cartesian -HA,Dec. */
27695 v = jauS2c(ri-astrom.eral, di);
27696 x = v[0];
27697 y = v[1];
27698 z = v[2];
27699
27700 /* Polar motion. */
27701 xhd = x + astrom.xpl*z;
27702 yhd = y - astrom.ypl*z;
27703 zhd = z - astrom.xpl*x + astrom.ypl*y;
27704
27705 /* Diurnal aberration. */
27706 f = ( 1.0 - astrom.diurab*yhd );
27707 xhdt = f * xhd;
27708 yhdt = f * ( yhd + astrom.diurab );
27709 zhdt = f * zhd;
27710
27711 /* Cartesian -HA,Dec to Cartesian Az,El (S=0,E=90). */
27712 xaet = astrom.sphi*xhdt - astrom.cphi*zhdt;
27713 yaet = yhdt;
27714 zaet = astrom.cphi*xhdt + astrom.sphi*zhdt;
27715
27716 /* Azimuth (N=0,E=90). */
27717 azobs = ( xaet != 0.0 || yaet != 0.0 ) ? atan2(yaet,-xaet) : 0.0;
27718
27719 /* ---------- */
27720 /* Refraction */
27721 /* ---------- */
27722
27723 /* Cosine and sine of altitude, with precautions. */
27724 r = sqrt(xaet*xaet + yaet*yaet);
27725 r = r > CELMIN ? r : CELMIN;
27726 z = zaet > SELMIN ? zaet : SELMIN;
27727
27728 /* A*tan(z)+B*tan^3(z) model, with Newton-Raphson correction. */
27729 tz = r/z;
27730 w = astrom.refb*tz*tz;
27731 del = ( astrom.refa + w ) * tz /
27732 ( 1.0 + ( astrom.refa + 3.0*w ) / ( z*z ) );
27733
27734 /* Apply the change, giving observed vector. */
27735 cosdel = 1.0 - del*del/2.0;
27736 f = cosdel - del*z/r;
27737 xaeo = xaet*f;
27738 yaeo = yaet*f;
27739 zaeo = cosdel*zaet + del*r;
27740
27741 /* Observed ZD. */
27742 zdobs = atan2(sqrt(xaeo*xaeo+yaeo*yaeo), zaeo);
27743
27744 /* Az/El vector to HA,Dec vector (both right-handed). */
27745 v[0] = astrom.sphi*xaeo + astrom.cphi*zaeo;
27746 v[1] = yaeo;
27747 v[2] = - astrom.cphi*xaeo + astrom.sphi*zaeo;
27748
27749 /* To spherical -HA,Dec. */
27750 SphericalCoordinate co = jauC2s ( v);
27751 hmobs = co.alpha;
27752 dcobs = co.delta;
27753 /* Right ascension (with respect to CIO). */
27754 raobs = astrom.eral + hmobs;
27755
27756 /* Return the results. */
27757 return new ObservedPosition(
27758 jauAnp(azobs),
27759 zdobs,
27760 -hmobs,
27761 dcobs,
27762 jauAnp(raobs));
27763
27764 /* Finished. */
27765
27766
27767 }
27768
27769 /**
27770 * Observed place at a groundbased site to to ICRS astrometric RA,Dec.
27771 * The caller supplies UTC, site coordinates, ambient air conditions
27772 * and observing wavelength.
27773 *
27774 *<p>This function is derived from the International Astronomical Union's
27775 * SOFA (Standards of Fundamental Astronomy) software collection.
27776 *
27777 *<p>Status: support function.
27778 *
27779 *<!-- Given: -->
27780 * @param type char[] type of coordinates - "R", "H" or "A" (Notes 1,2)
27781 * @param ob1 double observed Az, HA or RA (radians; Az is N=0,E=90)
27782 * @param ob2 double observed ZD or Dec (radians)
27783 * @param utc1 double UTC as a 2-part...
27784 * @param utc2 double ...quasi Julian Date (Notes 3,4)
27785 * @param dut1 double UT1-UTC (seconds, Note 5)
27786 * @param elong double longitude (radians, east +ve, Note 6)
27787 * @param phi double geodetic latitude (radians, Note 6)
27788 * @param hm double height above ellipsoid (m, geodetic Notes 6,8)
27789 * @param xp double polar motion coordinates (radians, Note 7)
27790 * @param yp double polar motion coordinates (radians, Note 7)
27791 * @param phpa double pressure at the observer (hPa = mB, Note 8)
27792 * @param tc double ambient temperature at the observer (deg C)
27793 * @param rh double relative humidity at the observer (range 0-1)
27794 * @param wl double wavelength (micrometers, Note 9)
27795 *
27796 *<!-- Returned:-->
27797 * @return rc,dc double <b>Returned</b> ICRS astrometric RA,Dec (radians)
27798 *
27799 * @throws JSOFAInternalError an internal error has occured
27800 * @throws JSOFAIllegalParameter
27801 * int status: <b>Returned</b> +1 = dubious year (Note 4)
27802 * 0 = <b>Returned</b> OK
27803 * -1 = <b>Returned</b> unacceptable date
27804 *
27805 *<p>Notes:
27806 * <ol>
27807 *
27808 * <li> "Observed" Az,ZD means the position that would be seen by a
27809 * perfect geodetically aligned theodolite. (Zenith distance is
27810 * used rather than altitude in order to reflect the fact that no
27811 * allowance is made for depression of the horizon.) This is
27812 * related to the observed HA,Dec via the standard rotation, using
27813 * the geodetic latitude (corrected for polar motion), while the
27814 * observed HA and RA are related simply through the Earth rotation
27815 * angle and the site longitude. "Observed" RA,Dec or HA,Dec thus
27816 * means the position that would be seen by a perfect equatorial
27817 * with its polar axis aligned to the Earth's axis of rotation.
27818 *
27819 * <li> Only the first character of the type argument is significant.
27820 * "R" or "r" indicates that ob1 and ob2 are the observed right
27821 * ascension and declination; "H" or "h" indicates that they are
27822 * hour angle (west +ve) and declination; anything else ("A" or
27823 * "a" is recommended) indicates that ob1 and ob2 are azimuth
27824 * (north zero, east 90 deg) and zenith distance.
27825 *
27826 * <li> utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any
27827 * convenient way between the two arguments, for example where utc1
27828 * is the Julian Day Number and utc2 is the fraction of a day.
27829 *
27830 * <p>However, JD cannot unambiguously represent UTC during a leap
27831 * second unless special measures are taken. The convention in the
27832 * present function is that the JD day represents UTC days whether
27833 * the length is 86399, 86400 or 86401 SI seconds.
27834 *
27835 * <p>Applications should use the function iauDtf2d to convert from
27836 * calendar date and time of day into 2-part quasi Julian Date, as
27837 * it implements the leap-second-ambiguity convention just
27838 * described.
27839 *
27840 * <li> The warning status "dubious year" flags UTCs that predate the
27841 * introduction of the time scale or that are too far in the
27842 * future to be trusted. See iauDat for further details.
27843 *
27844 * <li> UT1-UTC is tabulated in IERS bulletins. It increases by exactly
27845 * one second at the end of each positive UTC leap second,
27846 * introduced in order to keep UT1-UTC within +/- 0.9s. n.b. This
27847 * practice is under review, and in the future UT1-UTC may grow
27848 * essentially without limit.
27849 *
27850 * <li> The geographical coordinates are with respect to the WGS84
27851 * reference ellipsoid. TAKE CARE WITH THE LONGITUDE SIGN: the
27852 * longitude required by the present function is east-positive
27853 * (i.e. right-handed), in accordance with geographical convention.
27854 *
27855 * <li> The polar motion xp,yp can be obtained from IERS bulletins. The
27856 * values are the coordinates (in radians) of the Celestial
27857 * Intermediate Pole with respect to the International Terrestrial
27858 * Reference System (see IERS Conventions 2003), measured along the
27859 * meridians 0 and 90 deg west respectively. For many
27860 * applications, xp and yp can be set to zero.
27861 *
27862 * <li> If hm, the height above the ellipsoid of the observing station
27863 * in meters, is not known but phpa, the pressure in hPa (=mB), is
27864 * available, an adequate estimate of hm can be obtained from the
27865 * expression
27866 *
27867 * <p>hm = -29.3 * tsl * log ( phpa / 1013.25 );
27868 *
27869 * <p>where tsl is the approximate sea-level air temperature in K
27870 * (See Astrophysical Quantities, C.W.Allen, 3rd edition, section
27871 * 52). Similarly, if the pressure phpa is not known, it can be
27872 * estimated from the height of the observing station, hm, as
27873 * follows:
27874 *
27875 * <p>phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) );
27876 *
27877 * <p>Note, however, that the refraction is nearly proportional to
27878 * the pressure and that an accurate phpa value is important for
27879 * precise work.
27880 *
27881 * <li> The argument wl specifies the observing wavelength in
27882 * micrometers. The transition from optical to radio is assumed to
27883 * occur at 100 micrometers (about 3000 GHz).
27884 *
27885 * <li> The accuracy of the result is limited by the corrections for
27886 * refraction, which use a simple A*tan(z) + B*tan^3(z) model.
27887 * Providing the meteorological parameters are known accurately and
27888 * there are no gross local effects, the predicted astrometric
27889 * coordinates should be within 0.05 arcsec (optical) or 1 arcsec
27890 * (radio) for a zenith distance of less than 70 degrees, better
27891 * than 30 arcsec (optical or radio) at 85 degrees and better
27892 * than 20 arcmin (optical) or 30 arcmin (radio) at the horizon.
27893 *
27894 * <p>Without refraction, the complementary functions iauAtco13 and
27895 * iauAtoc13 are self-consistent to better than 1 microarcsecond
27896 * all over the celestial sphere. With refraction included,
27897 * consistency falls off at high zenith distances, but is still
27898 * better than 0.05 arcsec at 85 degrees.
27899 *
27900 * <li> It is advisable to take great care with units, as even unlikely
27901 * values of the input parameters are accepted and processed in
27902 * accordance with the models used.
27903 *
27904 * </ol>
27905 * Called:
27906 * <ul>
27907 * <li>{@link #jauApco13} astrometry parameters, ICRS-observed
27908 * <li>{@link #jauAtoiq} quick observed to CIRS
27909 * <li>{@link #jauAticq} quick CIRS to ICRS
27910 *
27911 * </ul>
27912 *@version 2013 October 9
27913 *
27914 *@since JSOFA release 20131202
27915 *
27916 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
27917 * @throws JSOFAInternalError an internal error has occured
27918 * @throws JSOFAIllegalParameter
27919 */
27920 public static SphericalCoordinate jauAtoc13(String type, double ob1, double ob2,
27921 double utc1, double utc2, double dut1,
27922 double elong, double phi, double hm, double xp, double yp,
27923 double phpa, double tc, double rh, double wl
27924 ) throws JSOFAIllegalParameter, JSOFAInternalError
27925 {
27926 Astrom astrom = new Astrom();
27927 jauApco13(utc1, utc2, dut1, elong, phi, hm, xp, yp,
27928 phpa, tc, rh, wl, astrom);
27929
27930 /* Transform observed to CIRS. */
27931 SphericalCoordinate co = jauAtoiq(type, ob1, ob2, astrom);
27932
27933 /* Transform CIRS to ICRS. */
27934 SphericalCoordinate icrs = jauAticq(co.alpha, co.delta, astrom);
27935 return icrs;
27936
27937
27938 /* Finished. */
27939
27940
27941 }
27942
27943 /**
27944 * Observed place to CIRS. The caller supplies UTC, site coordinates,
27945 * ambient air conditions and observing wavelength.
27946 *
27947 *<p>This function is derived from the International Astronomical Union's
27948 * SOFA (Standards of Fundamental Astronomy) software collection.
27949 *
27950 *<p>Status: support function.
27951 *
27952 *<!-- Given: -->
27953 * @param type char[] type of coordinates - "R", "H" or "A" (Notes 1,2)
27954 * @param ob1 double observed Az, HA or RA (radians; Az is N=0,E=90)
27955 * @param ob2 double observed ZD or Dec (radians)
27956 * @param utc1 double UTC as a 2-part...
27957 * @param utc2 double ...quasi Julian Date (Notes 3,4)
27958 * @param dut1 double UT1-UTC (seconds, Note 5)
27959 * @param elong double longitude (radians, east +ve, Note 6)
27960 * @param phi double geodetic latitude (radians, Note 6)
27961 * @param hm double height above the ellipsoid (meters, Notes 6,8)
27962 * @param xp double polar motion coordinates (radians, Note 7)
27963 * @param yp double polar motion coordinates (radians, Note 7)
27964 * @param phpa double pressure at the observer (hPa = mB, Note 8)
27965 * @param tc double ambient temperature at the observer (deg C)
27966 * @param rh double relative humidity at the observer (range 0-1)
27967 * @param wl double wavelength (micrometers, Note 9)
27968 *
27969 *<!-- Returned:-->
27970 * @return ri double* <b>Returned</b> CIRS right ascension (CIO-based, radians)
27971 * di double* <b>Returned</b> CIRS declination (radians)
27972 *
27973 * @throws JSOFAInternalError an internal error has occured
27974 * @throws JSOFAIllegalParameter
27975 * int status: <b>Returned</b> +1 = dubious year (Note 2)
27976 * 0 = <b>Returned</b> OK
27977 * -1 = <b>Returned</b> unacceptable date
27978 *
27979 *<p>Notes:
27980 * <ol>
27981 *
27982 * <li> "Observed" Az,ZD means the position that would be seen by a
27983 * perfect geodetically aligned theodolite. (Zenith distance is
27984 * used rather than altitude in order to reflect the fact that no
27985 * allowance is made for depression of the horizon.) This is
27986 * related to the observed HA,Dec via the standard rotation, using
27987 * the geodetic latitude (corrected for polar motion), while the
27988 * observed HA and RA are related simply through the Earth rotation
27989 * angle and the site longitude. "Observed" RA,Dec or HA,Dec thus
27990 * means the position that would be seen by a perfect equatorial
27991 * with its polar axis aligned to the Earth's axis of rotation.
27992 *
27993 * <li> Only the first character of the type argument is significant.
27994 * "R" or "r" indicates that ob1 and ob2 are the observed right
27995 * ascension and declination; "H" or "h" indicates that they are
27996 * hour angle (west +ve) and declination; anything else ("A" or
27997 * "a" is recommended) indicates that ob1 and ob2 are azimuth
27998 * (north zero, east 90 deg) and zenith distance.
27999 *
28000 * <li> utc1+utc2 is quasi Julian Date (see Note 2), apportioned in any
28001 * convenient way between the two arguments, for example where utc1
28002 * is the Julian Day Number and utc2 is the fraction of a day.
28003 *
28004 * <p>However, JD cannot unambiguously represent UTC during a leap
28005 * second unless special measures are taken. The convention in the
28006 * present function is that the JD day represents UTC days whether
28007 * the length is 86399, 86400 or 86401 SI seconds.
28008 *
28009 * <p>Applications should use the function iauDtf2d to convert from
28010 * calendar date and time of day into 2-part quasi Julian Date, as
28011 * it implements the leap-second-ambiguity convention just
28012 * described.
28013 *
28014 * <li> The warning status "dubious year" flags UTCs that predate the
28015 * introduction of the time scale or that are too far in the
28016 * future to be trusted. See iauDat for further details.
28017 *
28018 * <li> UT1-UTC is tabulated in IERS bulletins. It increases by exactly
28019 * one second at the end of each positive UTC leap second,
28020 * introduced in order to keep UT1-UTC within +/- 0.9s. n.b. This
28021 * practice is under review, and in the future UT1-UTC may grow
28022 * essentially without limit.
28023 *
28024 * <li> The geographical coordinates are with respect to the WGS84
28025 * reference ellipsoid. TAKE CARE WITH THE LONGITUDE SIGN: the
28026 * longitude required by the present function is east-positive
28027 * (i.e. right-handed), in accordance with geographical convention.
28028 *
28029 * <li> The polar motion xp,yp can be obtained from IERS bulletins. The
28030 * values are the coordinates (in radians) of the Celestial
28031 * Intermediate Pole with respect to the International Terrestrial
28032 * Reference System (see IERS Conventions 2003), measured along the
28033 * meridians 0 and 90 deg west respectively. For many
28034 * applications, xp and yp can be set to zero.
28035 *
28036 * <li> If hm, the height above the ellipsoid of the observing station
28037 * in meters, is not known but phpa, the pressure in hPa (=mB), is
28038 * available, an adequate estimate of hm can be obtained from the
28039 * expression
28040 *
28041 * <p>hm = -29.3 * tsl * log ( phpa / 1013.25 );
28042 *
28043 * <p>where tsl is the approximate sea-level air temperature in K
28044 * (See Astrophysical Quantities, C.W.Allen, 3rd edition, section
28045 * 52). Similarly, if the pressure phpa is not known, it can be
28046 * estimated from the height of the observing station, hm, as
28047 * follows:
28048 *
28049 * <p>phpa = 1013.25 * exp ( -hm / ( 29.3 * tsl ) );
28050 *
28051 * <p>Note, however, that the refraction is nearly proportional to
28052 * the pressure and that an accurate phpa value is important for
28053 * precise work.
28054 *
28055 * <li> The argument wl specifies the observing wavelength in
28056 * micrometers. The transition from optical to radio is assumed to
28057 * occur at 100 micrometers (about 3000 GHz).
28058 *
28059 * <li> The accuracy of the result is limited by the corrections for
28060 * refraction, which use a simple A*tan(z) + B*tan^3(z) model.
28061 * Providing the meteorological parameters are known accurately and
28062 * there are no gross local effects, the predicted astrometric
28063 * coordinates should be within 0.05 arcsec (optical) or 1 arcsec
28064 * (radio) for a zenith distance of less than 70 degrees, better
28065 * than 30 arcsec (optical or radio) at 85 degrees and better
28066 * than 20 arcmin (optical) or 30 arcmin (radio) at the horizon.
28067 *
28068 * <p>Without refraction, the complementary functions iauAtio13 and
28069 * iauAtoi13 are self-consistent to better than 1 microarcsecond
28070 * all over the celestial sphere. With refraction included,
28071 * consistency falls off at high zenith distances, but is still
28072 * better than 0.05 arcsec at 85 degrees.
28073 *
28074 * <li> It is advisable to take great care with units, as even unlikely
28075 * values of the input parameters are accepted and processed in
28076 * accordance with the models used.
28077 *
28078 * </ol>
28079 * Called:
28080 * <ul>
28081 * <li>{@link #jauApio13} astrometry parameters, CIRS-observed, 2013
28082 * <li>{@link #jauAtoiq} quick observed to CIRS
28083 *
28084 * </ul>
28085 *@version 2013 October 9
28086 *
28087 *@since JSOFA release 20131202
28088 *
28089 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
28090 * @throws JSOFAInternalError an internal error has occured
28091 * @throws JSOFAIllegalParameter
28092 */
28093 public static SphericalCoordinate jauAtoi13(String type, double ob1, double ob2,
28094 double utc1, double utc2, double dut1,
28095 double elong, double phi, double hm, double xp, double yp,
28096 double phpa, double tc, double rh, double wl
28097 ) throws JSOFAIllegalParameter, JSOFAInternalError
28098 {
28099 Astrom astrom = new Astrom();
28100
28101
28102 /* Star-independent astrometry parameters for CIRS->observed. */
28103 jauApio13(utc1, utc2, dut1, elong, phi, hm, xp, yp,
28104 phpa, tc, rh, wl, astrom);
28105
28106 /* Transform observed to CIRS. */
28107 SphericalCoordinate co = jauAtoiq(type, ob1, ob2, astrom);
28108 return co;
28109
28110 /* Finished. */
28111
28112
28113 }
28114
28115 /**
28116 * Quick observed place to CIRS, given the star-independent astrometry
28117 * parameters.
28118 *
28119 * Use of this function is appropriate when efficiency is important and
28120 * where many star positions are all to be transformed for one date.
28121 * The star-independent astrometry parameters can be obtained by
28122 * calling iauApio[13] or iauApco[13].
28123 *
28124 *<p>Status: support function.
28125 *
28126 *<!-- Given: -->
28127 * @param type char[] type of coordinates: "R", "H" or "A" (Note 1)
28128 * @param ob1 double observed Az, HA or RA (radians; Az is N=0,E=90)
28129 * @param ob2 double observed ZD or Dec (radians)
28130 * @param astrom star-independent astrometry parameters:
28131 *
28132 *<!-- Returned:-->
28133 * @return ri double* <b>Returned</b> CIRS right ascension (CIO-based, radians)
28134 * di double* <b>Returned</b> CIRS declination (radians)
28135 *
28136 *<p>Notes:
28137 * <ol>
28138 *
28139 * <li> "Observed" Az,El means the position that would be seen by a
28140 * perfect geodetically aligned theodolite. This is related to
28141 * the observed HA,Dec via the standard rotation, using the geodetic
28142 * latitude (corrected for polar motion), while the observed HA and
28143 * RA are related simply through the Earth rotation angle and the
28144 * site longitude. "Observed" RA,Dec or HA,Dec thus means the
28145 * position that would be seen by a perfect equatorial with its
28146 * polar axis aligned to the Earth's axis of rotation. By removing
28147 * from the observed place the effects of atmospheric refraction and
28148 * diurnal aberration, the CIRS RA,Dec is obtained.
28149 *
28150 * <li> Only the first character of the type argument is significant.
28151 * "R" or "r" indicates that ob1 and ob2 are the observed right
28152 * ascension and declination; "H" or "h" indicates that they are
28153 * hour angle (west +ve) and declination; anything else ("A" or
28154 * "a" is recommended) indicates that ob1 and ob2 are azimuth (north
28155 * zero, east 90 deg) and zenith distance. (Zenith distance is used
28156 * rather than altitude in order to reflect the fact that no
28157 * allowance is made for depression of the horizon.)
28158 *
28159 * <li> The accuracy of the result is limited by the corrections for
28160 * refraction, which use a simple A*tan(z) + B*tan^3(z) model.
28161 * Providing the meteorological parameters are known accurately and
28162 * there are no gross local effects, the predicted observed
28163 * coordinates should be within 0.05 arcsec (optical) or 1 arcsec
28164 * (radio) for a zenith distance of less than 70 degrees, better
28165 * than 30 arcsec (optical or radio) at 85 degrees and better than
28166 * 20 arcmin (optical) or 30 arcmin (radio) at the horizon.
28167 *
28168 * <p>Without refraction, the complementary functions iauAtioq and
28169 * iauAtoiq are self-consistent to better than 1 microarcsecond all
28170 * over the celestial sphere. With refraction included, consistency
28171 * falls off at high zenith distances, but is still better than
28172 * 0.05 arcsec at 85 degrees.
28173 *
28174 * <li> It is advisable to take great care with units, as even unlikely
28175 * values of the input parameters are accepted and processed in
28176 * accordance with the models used.
28177 *
28178 * </ol>
28179 * Called:
28180 * <ul>
28181 * <li>{@link #jauS2c} spherical coordinates to unit vector
28182 * <li>{@link #jauC2s} p-vector to spherical
28183 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
28184 *
28185 * </ul>
28186 *@version 2013 October 9
28187 *
28188 *@since JSOFA release 20131202
28189 *
28190 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
28191 */
28192 public static SphericalCoordinate jauAtoiq(String type,
28193 double ob1, double ob2, Astrom astrom
28194 )
28195 {
28196 char c;
28197 double c1, c2, sphi, cphi, ce, xaeo, yaeo, zaeo, v[] = new double[3],
28198 xmhdo, ymhdo, zmhdo, az, sz, zdo, refa, refb, tz, dref,
28199 zdt, xaet, yaet, zaet, xmhda, ymhda, zmhda,
28200 f, xhd, yhd, zhd, xpl, ypl, w;
28201
28202
28203 /* Coordinate type. */
28204 c = type.charAt(0);
28205
28206 /* Coordinates. */
28207 c1 = ob1;
28208 c2 = ob2;
28209
28210 /* Sin, cos of latitude. */
28211 sphi = astrom.sphi;
28212 cphi = astrom.cphi;
28213
28214 /* Standardize coordinate type. */
28215 if ( c == 'r' || c == 'R' ) {
28216 c = 'R';
28217 } else if ( c == 'h' || c == 'H' ) {
28218 c = 'H';
28219 } else {
28220 c = 'A';
28221 }
28222
28223 /* If Az,ZD, convert to Cartesian (S=0,E=90). */
28224 if ( c == 'A' ) {
28225 ce = sin(c2);
28226 xaeo = - cos(c1) * ce;
28227 yaeo = sin(c1) * ce;
28228 zaeo = cos(c2);
28229
28230 } else {
28231
28232 /* If RA,Dec, convert to HA,Dec. */
28233 if ( c == 'R' ) c1 = astrom.eral - c1;
28234
28235 /* To Cartesian -HA,Dec. */
28236 v = jauS2c ( -c1, c2 );
28237 xmhdo = v[0];
28238 ymhdo = v[1];
28239 zmhdo = v[2];
28240
28241 /* To Cartesian Az,El (S=0,E=90). */
28242 xaeo = sphi*xmhdo - cphi*zmhdo;
28243 yaeo = ymhdo;
28244 zaeo = cphi*xmhdo + sphi*zmhdo;
28245 }
28246
28247 /* Azimuth (S=0,E=90). */
28248 az = ( xaeo != 0.0 || yaeo != 0.0 ) ? atan2(yaeo,xaeo) : 0.0;
28249
28250 /* Sine of observed ZD, and observed ZD. */
28251 sz = sqrt ( xaeo*xaeo + yaeo*yaeo );
28252 zdo = atan2 ( sz, zaeo );
28253
28254 /*
28255 * Refraction
28256 * ----------
28257 */
28258
28259 /* Fast algorithm using two constant model. */
28260 refa = astrom.refa;
28261 refb = astrom.refb;
28262 tz = sz / zaeo;
28263 dref = ( refa + refb*tz*tz ) * tz;
28264 zdt = zdo + dref;
28265
28266 /* To Cartesian Az,ZD. */
28267 ce = sin(zdt);
28268 xaet = cos(az) * ce;
28269 yaet = sin(az) * ce;
28270 zaet = cos(zdt);
28271
28272 /* Cartesian Az,ZD to Cartesian -HA,Dec. */
28273 xmhda = sphi*xaet + cphi*zaet;
28274 ymhda = yaet;
28275 zmhda = - cphi*xaet + sphi*zaet;
28276
28277 /* Diurnal aberration. */
28278 f = ( 1.0 + astrom.diurab*ymhda );
28279 xhd = f * xmhda;
28280 yhd = f * ( ymhda - astrom.diurab );
28281 zhd = f * zmhda;
28282
28283 /* Polar motion. */
28284 xpl = astrom.xpl;
28285 ypl = astrom.ypl;
28286 w = xpl*xhd - ypl*yhd + zhd;
28287 v[0] = xhd - xpl*w;
28288 v[1] = yhd + ypl*w;
28289 v[2] = w - ( xpl*xpl + ypl*ypl ) * zhd;
28290
28291 /* To spherical -HA,Dec. */
28292 SphericalCoordinate co = jauC2s(v);
28293
28294 /* Right ascension. */
28295 co.alpha = jauAnp(astrom.eral + co.alpha);
28296
28297 return co;
28298 /* Finished. */
28299
28300
28301 }
28302
28303 /**
28304 * Apply light deflection by a solar-system body, as part of
28305 * transforming coordinate direction into natural direction.
28306 *
28307 *<p>This function is derived from the International Astronomical Union's
28308 * SOFA (Standards of Fundamental Astronomy) software collection.
28309 *
28310 *<p>Status: support function.
28311 *
28312 *<!-- Given: -->
28313 * @param bm double mass of the gravitating body (solar masses)
28314 * @param p double[3] direction from observer to source (unit vector)
28315 * @param q double[3] direction from body to source (unit vector)
28316 * @param e double[3] direction from body to observer (unit vector)
28317 * @param em double distance from body to observer (au)
28318 * @param dlim double deflection limiter (Note 4)
28319 *
28320 *<!-- Returned:-->
28321 * @return p1 double[3] <b>Returned</b> observer to deflected source (unit vector)
28322 *
28323 *<p>Notes:
28324 * <ol>
28325 *
28326 * <li> The algorithm is based on Expr. (70) in Klioner (2003) and
28327 * Expr. (7.63) in the Explanatory Supplement (Urban & Seidelmann
28328 * 2013), with some rearrangement to minimize the effects of machine
28329 * precision.
28330 *
28331 * <li> The mass parameter bm can, as required, be adjusted in order to
28332 * allow for such effects as quadrupole field.
28333 *
28334 * <li> The barycentric position of the deflecting body should ideally
28335 * correspond to the time of closest approach of the light ray to
28336 * the body.
28337 *
28338 * <li> The deflection limiter parameter dlim is phi^2/2, where phi is
28339 * the angular separation (in radians) between source and body at
28340 * which limiting is applied. As phi shrinks below the chosen
28341 * threshold, the deflection is artificially reduced, reaching zero
28342 * for phi = 0.
28343 *
28344 * <li> The returned vector p1 is not normalized, but the consequential
28345 * departure from unit magnitude is always negligible.
28346 *
28347 * <li> The arguments p and p1 can be the same array.
28348 *
28349 * <li> To accumulate total light deflection taking into account the
28350 * contributions from several bodies, call the present function for
28351 * each body in succession, in decreasing order of distance from the
28352 * observer.
28353 *
28354 * <li> For efficiency, validation is omitted. The supplied vectors must
28355 * be of unit magnitude, and the deflection limiter non-zero and
28356 * positive.
28357 *
28358 * </ol>
28359 *<p>References:
28360 * <ul>
28361 *
28362 * <li> Urban, S. & Seidelmann, P. K. (eds), Explanatory Supplement to
28363 * the Astronomical Almanac, 3rd ed., University Science Books
28364 * (2013).
28365 *
28366 * <li> Klioner, Sergei A., "A practical relativistic model for micro-
28367 * arcsecond astrometry in space", Astr. J. 125, 1580-1597 (2003).
28368 *
28369 * </ul>
28370 * Called:
28371 * <ul>
28372 * <li>{@link #jauPdp} scalar product of two p-vectors
28373 * <li>{@link #jauPxp} vector product of two p-vectors
28374 *
28375 * </ul>
28376 *@version 2013 October 9
28377 *
28378 *@since JSOFA release 20131202
28379 *
28380 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
28381 */
28382 public static double[] jauLd(double bm, double p[], double q[], double e[],
28383 double em, double dlim)
28384 {
28385 int i;
28386 double qpe[] = new double[3], qdqpe, w, eq[], peq[] ;
28387
28388 double p1[] = new double[3];
28389
28390 /* q . (q + e). */
28391 for (i = 0; i < 3; i++) {
28392 qpe[i] = q[i] + e[i];
28393 }
28394 qdqpe = jauPdp(q, qpe);
28395
28396 /* 2 x G x bm / ( em x c^2 x ( q . (q + e) ) ). */
28397 w = bm * SRS / em / max(qdqpe,dlim);
28398
28399 /* p x (e x q). */
28400 eq = jauPxp(e, q);
28401 peq = jauPxp(p, eq);
28402
28403 /* Apply the deflection. */
28404 for (i = 0; i < 3; i++) {
28405 p1[i] = p[i] + w*peq[i];
28406 }
28407
28408 return p1;
28409 /* Finished. */
28410
28411
28412 }
28413
28414 /*+
28415 * - - - - - - -
28416 * i a u L d n
28417 * - - - - - - -
28418 *
28419 * For a star, apply light deflection by multiple solar-system bodies,
28420 * as part of transforming coordinate direction into natural direction.
28421 *
28422 *<p>This function is derived from the International Astronomical Union's
28423 * SOFA (Standards of Fundamental Astronomy) software collection.
28424 *
28425 *<p>Status: support function.
28426 *
28427 *<!-- Given: -->
28428 * n int number of bodies (note 1)
28429 * b jauLDBODY[n] data for each of the n bodies (Notes 1,2):
28430 * bm double mass of the body (solar masses, Note 3)
28431 * dl double deflection limiter (Note 4)
28432 * pv [2][3] barycentric PV of the body (au, au/day)
28433 * ob double[3] barycentric position of the observer (au)
28434 * sc double[3] observer to star coord direction (unit vector)
28435 *
28436 *<!-- Returned:-->
28437 * sn double[3] observer to deflected star (unit vector)
28438 *
28439 * <li> The array b contains n entries, one for each body to be
28440 * considered. If n = 0, no gravitational light deflection will be
28441 * applied, not even for the Sun.
28442 *
28443 * <li> The array b should include an entry for the Sun as well as for
28444 * any planet or other body to be taken into account. The entries
28445 * should be in the order in which the light passes the body.
28446 *
28447 * <li> In the entry in the b array for body i, the mass parameter
28448 * b[i].bm can, as required, be adjusted in order to allow for such
28449 * effects as quadrupole field.
28450 *
28451 * <li> The deflection limiter parameter b[i].dl is phi^2/2, where phi is
28452 * the angular separation (in radians) between star and body at
28453 * which limiting is applied. As phi shrinks below the chosen
28454 * threshold, the deflection is artificially reduced, reaching zero
28455 * for phi = 0. Example values suitable for a terrestrial
28456 * observer, together with masses, are as follows:
28457 *
28458 * body i b[i].bm b[i].dl
28459 *
28460 * Sun 1.0 6e-6
28461 * Jupiter 0.00095435 3e-9
28462 * Saturn 0.00028574 3e-10
28463 *
28464 * <li> For cases where the starlight passes the body before reaching the
28465 * observer, the body is placed back along its barycentric track by
28466 * the light time from that point to the observer. For cases where
28467 * the body is "behind" the observer no such shift is applied. If
28468 * a different treatment is preferred, the user has the option of
28469 * instead using the iauLd function. Similarly, iauLd can be used
28470 * for cases where the source is nearby, not a star.
28471 *
28472 * <li> The returned vector sn is not normalized, but the consequential
28473 * departure from unit magnitude is always negligible.
28474 *
28475 * <li> The arguments sc and sn can be the same array.
28476 *
28477 * <li> For efficiency, validation is omitted. The supplied masses must
28478 * be greater than zero, the position and velocity vectors must be
28479 * right, and the deflection limiter greater than zero.
28480 *
28481 * Reference:
28482 *
28483 * Urban, S. & Seidelmann, P. K. (eds), Explanatory Supplement to
28484 * the Astronomical Almanac, 3rd ed., University Science Books
28485 * (2013), Section 7.2.4.
28486 *
28487 * Called:
28488 * iauCp copy p-vector
28489 * iauPdp scalar product of two p-vectors
28490 * iauPmp p-vector minus p-vector
28491 * iauPpsp p-vector plus scaled p-vector
28492 * iauPn decompose p-vector into modulus and direction
28493 * iauLd light deflection by a solar-system body
28494 *
28495 *@version 2013 October 9
28496 *
28497 *@since JSOFA release 20131202
28498 *
28499 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
28500 */
28501 public static double[] jauLdn(int n, Ldbody b[], double ob[], double sc[])
28502 {
28503 /* Light time for 1 au (days) */
28504 final double CR = AULT/DAYSEC;
28505
28506 int i;
28507 double v[] , dt, ev[], sn[] = new double[3];
28508
28509
28510 /* Star direction prior to deflection. */
28511 jauCp(sc, sn);
28512
28513 /* Body by body. */
28514 for ( i = 0; i < n; i++ ) {
28515
28516 /* Body to observer vector at epoch of observation (au). */
28517 v = jauPmp( ob, b[i].pv[0]);
28518
28519 /* Minus the time since the light passed the body (days). */
28520 dt = jauPdp(sn,v) * CR;
28521
28522 /* Neutralize if the star is "behind" the observer. */
28523 dt = min(dt, 0.0);
28524
28525 /* Backtrack the body to the time the light was passing the body. */
28526 ev = jauPpsp(v, -dt, b[i].pv[1]);
28527
28528 /* Body to observer vector as magnitude and direction. */
28529 NormalizedVector nv = jauPn(ev);
28530
28531 /* Apply light deflection for this body. */
28532 sn = jauLd( b[i].bm, sn, sn, nv.u, nv.r, b[i].dl );
28533
28534 /* Next body. */
28535 }
28536 return sn;
28537
28538 /* Finished. */
28539
28540
28541 }
28542
28543 /**
28544 * Deflection of starlight by the Sun.
28545 *
28546 *<p>This function is derived from the International Astronomical Union's
28547 * SOFA (Standards of Fundamental Astronomy) software collection.
28548 *
28549 *<p>Status: support function.
28550 *
28551 *<!-- Given: -->
28552 * @param p double[3] direction from observer to star (unit vector)
28553 * @param e double[3] direction from Sun to observer (unit vector)
28554 * @param em double distance from Sun to observer (au)
28555 *
28556 *<!-- Returned:-->
28557 * @return p1 double[3] <b>Returned</b> observer to deflected start (unit vector)
28558 *
28559 *<p>Notes:
28560 * <ol>
28561 *
28562 * <li> The source is presumed to be sufficiently distant that its
28563 * directions seen from the Sun and the observer are essentially
28564 * the same.
28565 *
28566 * <li> The deflection is restrained when the angle between the star and
28567 * the center of the Sun is less than a threshold value, falling to
28568 * zero deflection for zero separation. The chosen threshold value
28569 * is within the solar limb for all solar-system applications, and
28570 * is about 5 arcminutes for the case of a terrestrial observer.
28571 *
28572 * <li> The arguments p and p1 can be the same array.
28573 *
28574 * </ol>
28575 * Called:
28576 * <ul>
28577 * <li>{@link #jauLd} light deflection by a solar-system body
28578 *
28579 * </ul>
28580 *@version 2016 July 29
28581 *
28582 *@since JSOFA release 20131202
28583 *
28584 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
28585 */
28586 public static double[] jauLdsun(double p[], double e[], double em)
28587 {
28588 double em2, dlim;
28589
28590
28591 /* Deflection limiter (smaller for distant observers). */
28592 em2 = em*em;
28593 if ( em2 < 1.0 ) em2 = 1.0;
28594 dlim = 1e-6 / (em2 > 1.0 ? em2 : 1.0);
28595
28596 /* Apply the deflection. */
28597 return jauLd(1.0, p, p, e, em, dlim);
28598
28599 }
28600
28601 /**
28602 * Proper motion and parallax.
28603 *
28604 *<p>This function is derived from the International Astronomical Union's
28605 * SOFA (Standards of Fundamental Astronomy) software collection.
28606 *
28607 *<p>Status: support function.
28608 *
28609 *<!-- Given: -->
28610 * @param rc double ICRS RA,Dec at catalog epoch (radians)
28611 * @param dc double ICRS RA,Dec at catalog epoch (radians)
28612 * @param pr double RA proper motion (radians/year; Note 1)
28613 * @param pd double Dec proper motion (radians/year)
28614 * @param px double parallax (arcsec)
28615 * @param rv double radial velocity (km/s, +ve if receding)
28616 * @param pmt double proper motion time interval (SSB, Julian years)
28617 * @param pob double[3] SSB to observer vector (au)
28618 *
28619 *<!-- Returned:-->
28620 * @return pco double[3] <b>Returned</b> coordinate direction (BCRS unit vector)
28621 *
28622 *<p>Notes:
28623 * <ol>
28624 *
28625 * <li> The proper motion in RA is dRA/dt rather than cos(Dec)*dRA/dt.
28626 *
28627 * <li> The proper motion time interval is for when the starlight
28628 * reaches the solar system barycenter.
28629 *
28630 * <li> To avoid the need for iteration, the Roemer effect (i.e. the
28631 * small annual modulation of the proper motion coming from the
28632 * changing light time) is applied approximately, using the
28633 * direction of the star at the catalog epoch.
28634 *
28635 * </ol>
28636 *<p>References:
28637 * <ul>
28638 *
28639 * <li> 1984 Astronomical Almanac, pp B39-B41.
28640 *
28641 * <li> Urban, S. & Seidelmann, P. K. (eds), Explanatory Supplement to
28642 * the Astronomical Almanac, 3rd ed., University Science Books
28643 * (2013), Section 7.2.
28644 *
28645 * </ul>
28646 * Called:
28647 * <ul>
28648 * <li>{@link #jauPdp} scalar product of two p-vectors
28649 * <li>{@link #jauPn} decompose p-vector into modulus and direction
28650 *
28651 * </ul>
28652 *@version 2013 October 9
28653 *
28654 *@since JSOFA release 20131202
28655 *
28656 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
28657 */
28658 public static double[] jauPmpx(double rc, double dc, double pr, double pd,
28659 double px, double rv, double pmt, double pob[]
28660 )
28661 {
28662 /* Km/s to au/year */
28663 final double VF = DAYSEC*DJM/DAU;
28664
28665 /* Light time for 1 au, Julian years */
28666 final double AULTY = AULT/DAYSEC/DJY;
28667
28668 int i;
28669 double sr, cr, sd, cd, x, y, z, p[] = new double[3], dt, pxr, w, pdz, pm[] = new double[3];
28670
28671
28672 /* Spherical coordinates to unit vector (and useful functions). */
28673 sr = sin(rc);
28674 cr = cos(rc);
28675 sd = sin(dc);
28676 cd = cos(dc);
28677 p[0] = x = cr*cd;
28678 p[1] = y = sr*cd;
28679 p[2] = z = sd;
28680
28681 /* Proper motion time interval (y) including Roemer effect. */
28682 dt = pmt + jauPdp(p,pob)*AULTY;
28683
28684 /* Space motion (radians per year). */
28685 pxr = px * DAS2R;
28686 w = VF * rv * pxr;
28687 pdz = pd * z;
28688 pm[0] = - pr*y - pdz*cr + w*x;
28689 pm[1] = pr*x - pdz*sr + w*y;
28690 pm[2] = pd*cd + w*z;
28691
28692 /* Coordinate direction of star (unit vector, BCRS). */
28693 for (i = 0; i < 3; i++) {
28694 p[i] += dt*pm[i] - pxr*pob[i];
28695 }
28696 NormalizedVector pco = jauPn(p);
28697
28698 return pco.u;
28699 /* Finished. */
28700
28701
28702 }
28703
28704 /**
28705 * Star proper motion: update star catalog data for space motion, with
28706 * special handling to handle the zero parallax case.
28707 *
28708 *<p>This function is derived from the International Astronomical Union's
28709 * SOFA (Standards of Fundamental Astronomy) software collection.
28710 *
28711 *<p>Status: support function.
28712 *
28713 *<!-- Given: -->
28714 * @param ra1 double right ascension (radians), before
28715 * @param dec1 double declination (radians), before
28716 * @param pmr1 double RA proper motion (radians/year), before
28717 * @param pmd1 double Dec proper motion (radians/year), before
28718 * @param px1 double parallax (arcseconds), before
28719 * @param rv1 double radial velocity (km/s, +ve = receding), before
28720 * @param ep1a double "before" epoch, part A (Note 1)
28721 * @param ep1b double "before" epoch, part B (Note 1)
28722 * @param ep2a double "after" epoch, part A (Note 1)
28723 * @param ep2b double "after" epoch, part B (Note 1)
28724 *
28725 *<!-- Returned:-->
28726 * @return ra2 double <b>Returned</b> right ascension (radians), after
28727 * dec2 double <b>Returned</b> declination (radians), after
28728 * pmr2 double <b>Returned</b> RA proper motion (radians/year), after
28729 * pmd2 double <b>Returned</b> Dec proper motion (radians/year), after
28730 * px2 double <b>Returned</b> parallax (arcseconds), after
28731 * rv2 double <b>Returned</b> radial velocity (km/s, +ve = receding), after
28732 *
28733 *
28734 * @throws JSOFAInternalError int status:
28735 * -1 = <b>Returned</b> system error (should not occur)
28736 * 0 = <b>Returned</b> no warnings or errors
28737 * 1 = <b>Returned</b> distance overridden (Note 6)
28738 * 2 = <b>Returned</b> excessive velocity (Note 7)
28739 * 4 = <b>Returned</b> solution didn't converge (Note 8)
28740 * else = <b>Returned</b> binary logical OR of the above warnings
28741 *
28742 *<p>Notes:
28743 * <ol>
28744 *
28745 * <li> The starting and ending TDB epochs ep1a+ep1b and ep2a+ep2b are
28746 * Julian Dates, apportioned in any convenient way between the two
28747 * parts (A and B). For example, JD(TDB)=2450123.7 could be
28748 * expressed in any of these ways, among others:
28749 *
28750 * <p>epNa epNb
28751 *
28752 * 2450123.7 0.0 (JD method)
28753 * 2451545.0 -1421.3 (J2000 method)
28754 * 2400000.5 50123.2 (MJD method)
28755 * 2450123.5 0.2 (date & time method)
28756 *
28757 * <p>The JD method is the most natural and convenient to use in cases
28758 * where the loss of several decimal digits of resolution is
28759 * acceptable. The J2000 method is best matched to the way the
28760 * argument is handled internally and will deliver the optimum
28761 * resolution. The MJD method and the date & time methods are both
28762 * good compromises between resolution and convenience.
28763 *
28764 * <li> In accordance with normal star-catalog conventions, the object's
28765 * right ascension and declination are freed from the effects of
28766 * secular aberration. The frame, which is aligned to the catalog
28767 * equator and equinox, is Lorentzian and centered on the SSB.
28768 *
28769 * <p>The proper motions are the rate of change of the right ascension
28770 * and declination at the catalog epoch and are in radians per TDB
28771 * Julian year.
28772 *
28773 * <p>The parallax and radial velocity are in the same frame.
28774 *
28775 * <li> Care is needed with units. The star coordinates are in radians
28776 * and the proper motions in radians per Julian year, but the
28777 * parallax is in arcseconds.
28778 *
28779 * <li> The RA proper motion is in terms of coordinate angle, not true
28780 * angle. If the catalog uses arcseconds for both RA and Dec proper
28781 * motions, the RA proper motion will need to be divided by cos(Dec)
28782 * before use.
28783 *
28784 * <li> Straight-line motion at constant speed, in the inertial frame, is
28785 * assumed.
28786 *
28787 * <li> An extremely small (or zero or negative) parallax is overridden
28788 * to ensure that the object is at a finite but very large distance,
28789 * but not so large that the proper motion is equivalent to a large
28790 * but safe speed (about 0.1c using the chosen constant). A warning
28791 * status of 1 is added to the status if this action has been taken.
28792 *
28793 * <li> If the space velocity is a significant fraction of c (see the
28794 * constant VMAX in the function iauStarpv), it is arbitrarily set
28795 * to zero. When this action occurs, 2 is added to the status.
28796 *
28797 * <li> The relativistic adjustment carried out in the iauStarpv function
28798 * involves an iterative calculation. If the process fails to
28799 * converge within a set number of iterations, 4 is added to the
28800 * status.
28801 *
28802 * </ol>
28803 * Called:
28804 * <ul>
28805 * <li>{@link #jauSeps} angle between two points
28806 * <li>{@link #jauStarpm} update star catalog data for space motion
28807 *
28808 * </ul>
28809 *@version 2013 October 9
28810 *
28811 *@since JSOFA release 20131202
28812 *
28813 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
28814 * @throws JSOFAInternalError an internal error has occured
28815 */
28816 public static CatalogCoords jauPmsafe(double ra1, double dec1, double pmr1, double pmd1,
28817 double px1, double rv1,
28818 double ep1a, double ep1b, double ep2a, double ep2b) throws JSOFAInternalError
28819 {
28820
28821 /* Minimum allowed parallax (arcsec) */
28822 final double PXMIN = 5e-7;
28823
28824 /* Factor giving maximum allowed transverse speed of about 1% c */
28825 final double F = 326.0;
28826
28827 double pm, px1a;
28828
28829
28830 /* Proper motion in one year (radians). */
28831 pm = jauSeps(ra1, dec1, ra1+pmr1, dec1+pmd1);
28832
28833
28834 px1a = px1;
28835 pm *= F;
28836 if (px1a < pm) {px1a = pm;}
28837 if (px1a < PXMIN) {px1a = PXMIN;}
28838
28839 /* Carry out the transformation using the modified parallax. */
28840 return jauStarpm(ra1, dec1, pmr1, pmd1, px1a, rv1,
28841 ep1a, ep1b, ep2a, ep2b);
28842
28843 /* Finished. */
28844
28845
28846 }
28847
28848 /**
28849 * Position and velocity of a terrestrial observing station.
28850 *
28851 *<p>This function is derived from the International Astronomical Union's
28852 * SOFA (Standards of Fundamental Astronomy) software collection.
28853 *
28854 *<p>Status: support function.
28855 *
28856 *<!-- Given: -->
28857 * @param elong double longitude (radians, east +ve, Note 1)
28858 * @param phi double latitude (geodetic, radians, Note 1)
28859 * @param hm double height above ref. ellipsoid (geodetic, m)
28860 * @param xp double coordinates of the pole (radians, Note 2)
28861 * @param yp double coordinates of the pole (radians, Note 2)
28862 * @param sp double the TIO locator s' (radians, Note 2)
28863 * @param theta double Earth rotation angle (radians, Note 3)
28864 *
28865 *<!-- Returned:-->
28866 * @return pv double[2][3] <b>Returned</b> position/velocity vector (m, m/s, CIRS)
28867 *
28868 *<p>Notes:
28869 * <ol>
28870 *
28871 * <li> The terrestrial coordinates are with respect to the WGS84
28872 * reference ellipsoid.
28873 *
28874 * <li> xp and yp are the coordinates (in radians) of the Celestial
28875 * Intermediate Pole with respect to the International Terrestrial
28876 * Reference System (see IERS Conventions), measured along the
28877 * meridians 0 and 90 deg west respectively. sp is the TIO locator
28878 * s', in radians, which positions the Terrestrial Intermediate
28879 * Origin on the equator. For many applications, xp, yp and
28880 * (especially) sp can be set to zero.
28881 *
28882 * <li> If theta is Greenwich apparent sidereal time instead of Earth
28883 * rotation angle, the result is with respect to the true equator
28884 * and equinox of date, i.e. with the x-axis at the equinox rather
28885 * than the celestial intermediate origin.
28886 *
28887 * <li> The velocity units are meters per UT1 second, not per SI second.
28888 * This is unlikely to have any practical consequences in the modern
28889 * era.
28890 *
28891 * <li> No validation is performed on the arguments. Error cases that
28892 * could lead to arithmetic exceptions are trapped by the iauGd2gc
28893 * function, and the result set to zeros.
28894 *
28895 * </ol>
28896 *<p>References:
28897 * <ul>
28898 *
28899 * <li> McCarthy, D. D., Petit, G. (eds.), IERS Conventions (2003),
28900 * IERS Technical Note No. 32, BKG (2004)
28901 *
28902 * <li> Urban, S. & Seidelmann, P. K. (eds), Explanatory Supplement to
28903 * the Astronomical Almanac, 3rd ed., University Science Books
28904 * (2013), Section 7.4.3.3.
28905 *
28906 * </ul>
28907 * Called:
28908 * <ul>
28909 * <li>{@link #jauGd2gc} geodetic to geocentric transformation
28910 * <li>{@link #jauPom00} polar motion matrix
28911 * <li>{@link #jauTrxp} product of transpose of r-matrix and p-vector
28912 *
28913 * </ul>
28914 *@version 2013 October 9
28915 *
28916 * @since JSOFA release 20131202
28917 *
28918 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
28919 * @throws JSOFAInternalError an internal error has occured
28920 * @throws JSOFAIllegalParameter
28921 */
28922 public static double [][] jauPvtob(double elong, double phi, double hm,
28923 double xp, double yp, double sp, double theta
28924 ) throws JSOFAIllegalParameter, JSOFAInternalError
28925 {
28926
28927 double xyzm[];
28928
28929 /* Geodetic to geocentric transformation (WGS84). */
28930 xyzm = jauGd2gc(1, elong, phi, hm);
28931
28932 return jauPvtob(xyzm, xp, yp, sp, theta );
28933 /* Finished. */
28934
28935
28936 }
28937
28938 /**
28939 * Alternative Position and velocity of a terrestrial observing station with observatory position already in cartesian.
28940 * @see JSOFA#jauPvtob(double, double, double, double, double, double, double) for more detail.
28941 * @param xyzm observatory geocentric position in metres.
28942 * @param xp double coordinates of the pole (radians, Note 2)
28943 * @param yp double coordinates of the pole (radians, Note 2)
28944 * @param sp double the TIO locator s' (radians, Note 2)
28945 * @param theta double Earth rotation angle (radians, Note 3)
28946 * @return pv double[2][3] <b>Returned</b> position/velocity vector (m, m/s, CIRS)
28947 * @throws JSOFAIllegalParameter
28948 * @throws JSOFAInternalError an internal error has occured
28949 */
28950 public static double [][] jauPvtob(double xyzm[],
28951 double xp, double yp, double sp, double theta
28952 ) throws JSOFAIllegalParameter, JSOFAInternalError
28953 {
28954 /* Earth rotation rate in radians per UT1 second */
28955 final double OM = 1.00273781191135448 * D2PI / DAYSEC;
28956
28957 double rpm[][], xyz[], x, y, z, s, c;
28958 double pv[][] = new double[2][3];
28959
28960
28961 /* Polar motion and TIO position. */
28962 rpm = jauPom00(xp, yp, sp);
28963 xyz = jauTrxp(rpm, xyzm);
28964 x = xyz[0];
28965 y = xyz[1];
28966 z = xyz[2];
28967
28968 /* Functions of ERA. */
28969 s = sin(theta);
28970 c = cos(theta);
28971
28972 /* Position. */
28973 pv[0][0] = c*x - s*y;
28974 pv[0][1] = s*x + c*y;
28975 pv[0][2] = z;
28976
28977 /* Velocity. */
28978 pv[1][0] = OM * ( -s*x - c*y );
28979 pv[1][1] = OM * ( c*x - s*y );
28980 pv[1][2] = 0.0;
28981
28982 return pv;
28983 /* Finished. */
28984
28985
28986 }
28987
28988 /**
28989 * constants A and B in the atmospheric refraction model
28990 * dZ = A tan Z + B tan^3 Z.
28991 * .
28992 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 28 Mar 2014
28993 * @version $Revision$ $date$
28994 */
28995 public static class RefCos {
28996 /** refraction coefficient A */
28997 public double a ;
28998
28999 /** refraction coefficient B */
29000 public double b ;
29001 public RefCos(double a, double b) {
29002 this.a = a;
29003 this.b = b;
29004 }
29005
29006 }
29007
29008 /**
29009 * Determine the constants A and B in the atmospheric refraction model
29010 * dZ = A tan Z + B tan^3 Z.
29011 *
29012 * Z is the "observed" zenith distance (i.e. affected by refraction)
29013 * and dZ is what to add to Z to give the "topocentric" (i.e. in vacuo)
29014 * zenith distance.
29015 *
29016 *<p>This function is derived from the International Astronomical Union's
29017 * SOFA (Standards of Fundamental Astronomy) software collection.
29018 *
29019 *<p>Status: support function.
29020 *
29021 *<!-- Given: -->
29022 * @param phpa double pressure at the observer (hPa = millibar)
29023 * @param tc double ambient temperature at the observer (deg C)
29024 * @param rh double relative humidity at the observer (range 0-1)
29025 * @param wl double wavelength (micrometers)
29026 *
29027 *<!-- Returned:-->
29028 * @return <b>Returned</b> tan Z coefficient (radians)
29029 * <b>Returned</b> tan^3 Z coefficient (radians)
29030 *
29031 *<p>Notes:
29032 * <ol>
29033 *
29034 * <li> The model balances speed and accuracy to give good results in
29035 * applications where performance at low altitudes is not paramount.
29036 * Performance is maintained across a range of conditions, and
29037 * applies to both optical/IR and radio.
29038 *
29039 * <li> The model omits the effects of (i) height above sea level (apart
29040 * from the reduced pressure itself), (ii) latitude (i.e. the
29041 * flattening of the Earth), (iii) variations in tropospheric lapse
29042 * rate and (iv) dispersive effects in the radio.
29043 *
29044 * <p>The model was tested using the following range of conditions:
29045 *
29046 * <p>lapse rates 0.0055, 0.0065, 0.0075 deg/meter
29047 * latitudes 0, 25, 50, 75 degrees
29048 * heights 0, 2500, 5000 meters ASL
29049 * pressures mean for height -10% to +5% in steps of 5%
29050 * temperatures -10 deg to +20 deg with respect to 280 deg at SL
29051 * relative humidity 0, 0.5, 1
29052 * wavelengths 0.4, 0.6, ... 2 micron, + radio
29053 * zenith distances 15, 45, 75 degrees
29054 *
29055 * <p>The accuracy with respect to raytracing through a model
29056 * atmosphere was as follows:
29057 *
29058 * <p>worst RMS
29059 *
29060 * <p>optical/IR 62 mas 8 mas
29061 * radio 319 mas 49 mas
29062 *
29063 * <p>For this particular set of conditions:
29064 *
29065 * <p>lapse rate 0.0065 K/meter
29066 * latitude 50 degrees
29067 * sea level
29068 * pressure 1005 mb
29069 * temperature 280.15 K
29070 * humidity 80%
29071 * wavelength 5740 Angstroms
29072 *
29073 * <p>the results were as follows:
29074 *
29075 * <p>ZD raytrace iauRefco Saastamoinen
29076 *
29077 * 10 10.27 10.27 10.27
29078 * 20 21.19 21.20 21.19
29079 * 30 33.61 33.61 33.60
29080 * 40 48.82 48.83 48.81
29081 * 45 58.16 58.18 58.16
29082 * 50 69.28 69.30 69.27
29083 * 55 82.97 82.99 82.95
29084 * 60 100.51 100.54 100.50
29085 * 65 124.23 124.26 124.20
29086 * 70 158.63 158.68 158.61
29087 * 72 177.32 177.37 177.31
29088 * 74 200.35 200.38 200.32
29089 * 76 229.45 229.43 229.42
29090 * 78 267.44 267.29 267.41
29091 * 80 319.13 318.55 319.10
29092 *
29093 * <p>deg arcsec arcsec arcsec
29094 *
29095 * <p>The values for Saastamoinen's formula (which includes terms
29096 * up to tan^5) are taken from Hohenkerk and Sinclair (1985).
29097 *
29098 * <li> A wl value in the range 0-100 selects the optical/IR case and is
29099 * wavelength in micrometers. Any value outside this range selects
29100 * the radio case.
29101 *
29102 * <li> Outlandish input parameters are silently limited to
29103 * mathematically safe values. Zero pressure is permissible, and
29104 * causes zeroes to be returned.
29105 *
29106 * <li> The algorithm draws on several sources, as follows:
29107 *
29108 * <p>a) The formula for the saturation vapour pressure of water as
29109 * a function of temperature and temperature is taken from
29110 * Equations (A4.5-A4.7) of Gill (1982).
29111 *
29112 * <p>b) The formula for the water vapour pressure, given the
29113 * saturation pressure and the relative humidity, is from
29114 * Crane (1976), Equation (2.5.5).
29115 *
29116 * <p>c) The refractivity of air is a function of temperature,
29117 * total pressure, water-vapour pressure and, in the case
29118 * of optical/IR, wavelength. The formulae for the two cases are
29119 * developed from Hohenkerk & Sinclair (1985) and Rueger (2002).
29120 *
29121 * <p>d) The formula for beta, the ratio of the scale height of the
29122 * atmosphere to the geocentric distance of the observer, is
29123 * an adaption of Equation (9) from Stone (1996). The
29124 * adaptations, arrived at empirically, consist of (i) a small
29125 * adjustment to the coefficient and (ii) a humidity term for the
29126 * radio case only.
29127 *
29128 * <p>e) The formulae for the refraction constants as a function of
29129 * n-1 and beta are from Green (1987), Equation (4.31).
29130 *
29131 * </ol>
29132 *<p>References:
29133 * <ul>
29134 *
29135 * <li> Crane, R.K., Meeks, M.L. (ed), "Refraction Effects in the Neutral
29136 * Atmosphere", Methods of Experimental Physics: Astrophysics 12B,
29137 * Academic Press, 1976.
29138 *
29139 * <li> Gill, Adrian E., "Atmosphere-Ocean Dynamics", Academic Press,
29140 * 1982.
29141 *
29142 * <li> Green, R.M., "Spherical Astronomy", Cambridge University Press,
29143 * 1987.
29144 *
29145 * <li> Hohenkerk, C.Y., & Sinclair, A.T., NAO Technical Note No. 63,
29146 * 1985.
29147 *
29148 * <li> Rueger, J.M., "Refractive Index Formulae for Electronic Distance
29149 * Measurement with Radio and Millimetre Waves", in Unisurv Report
29150 * S-68, School of Surveying and Spatial Information Systems,
29151 * University of New South Wales, Sydney, Australia, 2002.
29152 *
29153 * <li> Stone, Ronald C., P.A.S.P. 108, 1051-1058, 1996.
29154 *
29155 * </ul>
29156 *@version 2013 October 9
29157 *
29158 *@since JSOFA release 20131202
29159 *
29160 * <!-- Copyright (C) 2013 IAU SOFA Board. See notes at end. -->
29161 */
29162 public static RefCos jauRefco(double phpa, double tc, double rh, double wl )
29163 {
29164 boolean optic;
29165 double p, t, r, w, ps, pw, tk, wlsq, gamma, beta;
29166
29167
29168 /* Decide whether optical/IR or radio case: switch at 100 microns. */
29169 optic = ( wl <= 100.0 );
29170
29171 /* Restrict parameters to safe values. */
29172 t = max ( tc, -150.0 );
29173 t = min ( t, 200.0 );
29174 p = max ( phpa, 0.0 );
29175 p = min ( p, 10000.0 );
29176 r = max ( rh, 0.0 );
29177 r = min ( r, 1.0 );
29178 w = max ( wl, 0.1 );
29179 w = min ( w, 1e6 );
29180
29181 /* Water vapour pressure at the observer. */
29182 if ( p > 0.0 ) {
29183 ps = pow ( 10.0, ( 0.7859 + 0.03477*t ) /
29184 ( 1.0 + 0.00412*t ) ) *
29185 ( 1.0 + p * ( 4.5e-6 + 6e-10*t*t ) );
29186 pw = r * ps / ( 1.0 - (1.0-r)*ps/p );
29187 } else {
29188 pw = 0.0;
29189 }
29190
29191 /* Refractive index minus 1 at the observer. */
29192 tk = t + 273.15;
29193 if ( optic ) {
29194 wlsq = w * w;
29195 gamma = ( ( 77.53484e-6 +
29196 ( 4.39108e-7 + 3.666e-9/wlsq ) / wlsq ) * p
29197 - 11.2684e-6*pw ) / tk;
29198 } else {
29199 gamma = ( 77.6890e-6*p - ( 6.3938e-6 - 0.375463/tk ) * pw ) / tk;
29200 }
29201
29202 /* Formula for beta from Stone, with empirical adjustments. */
29203 beta = 4.4474e-6 * tk;
29204 if ( ! optic ) beta -= 0.0074 * pw * beta;
29205
29206 /* Refraction constants from Green. */
29207 return new RefCos( gamma * ( 1.0 - beta ),
29208 - gamma * ( beta - gamma / 2.0 ));
29209
29210 /* Finished. */
29211
29212
29213 }
29214
29215
29216 /**
29217 * Transformation from Galactic Coordinates to ICRS.
29218 *
29219 * This function is derived from the International Astronomical Union's
29220 * SOFA (Standards of Fundamental Astronomy) software collection.
29221 *
29222 * <p>Status: support routine.
29223 *
29224 * @param dl double galactic longitude (radians)
29225 * @param db double galactic latitude (radians)
29226 *
29227 * @return co ICRS right ascension, declination.
29228 *
29229 * <p>Notes:<ol>
29230 *
29231 * <li> The IAU 1958 system of Galactic coordinates was defined with
29232 * respect to the now obsolete reference system FK4 B1950.0. When
29233 * interpreting the system in a modern context, several factors have
29234 * to be taken into account:<ul>
29235 *
29236 * <li> The inclusion in FK4 positions of the E-terms of aberration.
29237 *
29238 * <li> The distortion of the FK4 proper motion system by differential
29239 * Galactic rotation.
29240 *
29241 * <li> The use of the B1950.0 equinox rather than the now-standard
29242 * J2000.0.
29243 *
29244 * <li> The frame bias between ICRS and the J2000.0 mean place system.
29245 * </ul>
29246 * The Hipparcos Catalogue (Perryman & ESA 1997) provides a rotation
29247 * matrix that transforms directly between ICRS and Galactic
29248 * coordinates with the above factors taken into account. The
29249 * matrix is derived from three angles, namely the ICRS coordinates
29250 * of the Galactic pole and the longitude of the ascending node of
29251 * the galactic equator on the ICRS equator. They are given in
29252 * degrees to five decimal places and for canonical purposes are
29253 * regarded as exact. In the Hipparcos Catalogue the matrix
29254 * elements are given to 10 decimal places (about 20 microarcsec).
29255 * In the present SOFA function the matrix elements have been
29256 * recomputed from the canonical three angles and are given to 30
29257 * decimal places.
29258 *
29259 * <li> The inverse transformation is performed by the function jauIcrs2g.
29260 * </ol>
29261 *
29262 * Reference:
29263 * Perryman M.A.C. & ESA, 1997, ESA SP-1200, The Hipparcos and Tycho
29264 * catalogues. Astrometric and photometric star catalogues
29265 * derived from the ESA Hipparcos Space Astrometry Mission. ESA
29266 * Publications Division, Noordwijk, Netherlands.
29267 *
29268 * @version 2015 March 02
29269 *
29270 *
29271 * @since JSOFA release 20150209
29272 *
29273 */
29274 public static SphericalCoordinate jauG2icrs ( double dl, double db)
29275 {
29276 double v1[], v2[];
29277
29278 /*
29279 * L2,B2 system of galactic coordinates in the form presented in the
29280 * Hipparcos Catalogue. In degrees:
29281 *
29282 * P = 192.85948 right ascension of the Galactic north pole in ICRS
29283 * Q = 27.12825 declination of the Galactic north pole in ICRS
29284 * R = 32.93192 longitude of the ascending node of the Galactic
29285 * plane on the ICRS equator
29286 *
29287 * ICRS to galactic rotation matrix, obtained by computing
29288 * R_3(-R) R_1(pi/2-Q) R_3(pi/2+P) to the full precision shown:
29289 */
29290 double r[][] = new double[][]{ { -0.054875560416215368492398900454,
29291 -0.873437090234885048760383168409,
29292 -0.483835015548713226831774175116 },
29293 { +0.494109427875583673525222371358,
29294 -0.444829629960011178146614061616,
29295 +0.746982244497218890527388004556 },
29296 { -0.867666149019004701181616534570,
29297 -0.198076373431201528180486091412,
29298 +0.455983776175066922272100478348 } };
29299
29300
29301 /* Spherical to Cartesian. */
29302 v1 = jauS2c(dl, db);
29303
29304 /* Galactic to ICRS. */
29305 v2 = jauTrxp(r, v1);
29306
29307 /* Cartesian to spherical. */
29308 SphericalCoordinate co = jauC2s(v2);
29309
29310 /* Express in conventional ranges. */
29311 co.alpha = jauAnp(co.alpha);
29312 co.delta = jauAnpm(co.delta);
29313
29314 /* Finished. */
29315 return co;
29316 }
29317
29318
29319
29320 /**
29321 * Transformation from ICRS to Galactic Coordinates.
29322 *
29323 * This function is derived from the International Astronomical Union's
29324 * SOFA (Standards of Fundamental Astronomy) software collection.
29325 *
29326 * <p>Status: support routine.
29327 *
29328 * @param dr double ICRS right ascension (radians)
29329 * @param dd double ICRS declination (radians)
29330 *
29331 * @return co galactic longitude (radians), galactic latitude (radians)
29332 *
29333 * <p>Notes:<ol>
29334 *
29335 * <li> The IAU 1958 system of Galactic coordinates was defined with
29336 * respect to the now obsolete reference system FK4 B1950.0. When
29337 * interpreting the system in a modern context, several factors have
29338 * to be taken into account:<ul>
29339 *
29340 * <li> The inclusion in FK4 positions of the E-terms of aberration.
29341 *
29342 * <li> The distortion of the FK4 proper motion system by differential
29343 * Galactic rotation.
29344 *
29345 * <li> The use of the B1950.0 equinox rather than the now-standard
29346 * J2000.0.
29347 *
29348 * <li> The frame bias between ICRS and the J2000.0 mean place system.
29349 * </ul>
29350 * The Hipparcos Catalogue (Perryman & ESA 1997) provides a rotation
29351 * matrix that transforms directly between ICRS and Galactic
29352 * coordinates with the above factors taken into account. The
29353 * matrix is derived from three angles, namely the ICRS coordinates
29354 * of the Galactic pole and the longitude of the ascending node of
29355 * the galactic equator on the ICRS equator. They are given in
29356 * degrees to five decimal places and for canonical purposes are
29357 * regarded as exact. In the Hipparcos Catalogue the matrix
29358 * elements are given to 10 decimal places (about 20 microarcsec).
29359 * In the present SOFA function the matrix elements have been
29360 * recomputed from the canonical three angles and are given to 30
29361 * decimal places.
29362 *
29363 * <li> The inverse transformation is performed by the function iauG2icrs.
29364 * </ol>
29365 * Reference:
29366 * Perryman M.A.C. & ESA, 1997, ESA SP-1200, The Hipparcos and Tycho
29367 * catalogues. Astrometric and photometric star catalogues
29368 * derived from the ESA Hipparcos Space Astrometry Mission. ESA
29369 * Publications Division, Noordwijk, Netherlands.
29370 *
29371 * @version 2015 January 20
29372 *
29373 * @since JSOFA release 20150209
29374 *
29375 */
29376 public static SphericalCoordinate jauIcrs2g ( double dr, double dd )
29377 {
29378 double v1[], v2[];
29379
29380 /*
29381 * L2,B2 system of galactic coordinates in the form presented in the
29382 * Hipparcos Catalogue. In degrees:
29383 *
29384 * P = 192.85948 right ascension of the Galactic north pole in ICRS
29385 * Q = 27.12825 declination of the Galactic north pole in ICRS
29386 * R = 32.93192 longitude of the ascending node of the Galactic
29387 * plane on the ICRS equator
29388 *
29389 * ICRS to galactic rotation matrix, obtained by computing
29390 * R_3(-R) R_1(pi/2-Q) R_3(pi/2+P) to the full precision shown:
29391 */
29392 double r[][] = new double[][] { { -0.054875560416215368492398900454,
29393 -0.873437090234885048760383168409,
29394 -0.483835015548713226831774175116 },
29395 { +0.494109427875583673525222371358,
29396 -0.444829629960011178146614061616,
29397 +0.746982244497218890527388004556 },
29398 { -0.867666149019004701181616534570,
29399 -0.198076373431201528180486091412,
29400 +0.455983776175066922272100478348 } };
29401
29402
29403 /* Spherical to Cartesian. */
29404 v1 = jauS2c(dr, dd);
29405
29406 /* ICRS to Galactic. */
29407 v2 = jauRxp(r, v1);
29408
29409 /* Cartesian to spherical. */
29410 SphericalCoordinate co = jauC2s(v2);
29411
29412 /* Express in conventional ranges. */
29413 co.alpha = jauAnp(co.alpha);
29414 co.delta = jauAnpm(co.delta);
29415 return co;
29416 }
29417
29418 // 2016-05-03 additions below
29419
29420 /**
29421 *
29422 * Transformation from ecliptic coordinates (mean equinox and ecliptic
29423 * of date) to ICRS RA,Dec, using the IAU 2006 precession model.
29424 *
29425 * <p>This function is derived from the International Astronomical Union's
29426 * SOFA (Standards of Fundamental Astronomy) software collection.
29427 *
29428 * <p>Status: support function.
29429 *
29430 * <!-- Given: -->
29431 * @param date1 double TT as a 2-part Julian date (Note 1)
29432 * @param date2 double TT as a 2-part Julian date (Note 1)
29433 * @param dl double ecliptic longitude and latitude (radians)
29434 * @param db double ecliptic longitude and latitude (radians)
29435 *
29436 * <!-- Returned: -->
29437 * @return double ICRS right ascension and declination (radians)
29438 *
29439 *<ol>
29440 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
29441 * convenient way between the two arguments. For example,
29442 * JD(TT)=2450123.7 could be expressed in any of these ways,
29443 * among others:
29444 *
29445 * date1 date2
29446 *
29447 * 2450123.7 0.0 (JD method)
29448 * 2451545.0 -1421.3 (J2000 method)
29449 * 2400000.5 50123.2 (MJD method)
29450 * 2450123.5 0.2 (date & time method)
29451 *
29452 * The JD method is the most natural and convenient to use in
29453 * cases where the loss of several decimal digits of resolution
29454 * is acceptable. The J2000 method is best matched to the way
29455 * the argument is handled internally and will deliver the
29456 * optimum resolution. The MJD method and the date & time methods
29457 * are both good compromises between resolution and convenience.
29458 *
29459 * <li> No assumptions are made about whether the coordinates represent
29460 * starlight and embody astrometric effects such as parallax or
29461 * aberration.
29462 *
29463 * <li> The transformation is approximately that from ecliptic longitude
29464 * and latitude (mean equinox and ecliptic of date) to mean J2000.0
29465 * right ascension and declination, with only frame bias (always
29466 * less than 25 mas) to disturb this classical picture.
29467 *</ol>
29468 * Called: <ul>
29469 * <li>{@link #jauS2c} spherical coordinates to unit vector
29470 * <li>{@link #jauEcm06} J2000.0 to ecliptic rotation matrix, IAU 2006
29471 * <li>{@link #jauTrxp} product of transpose of r-matrix and p-vector
29472 * <li>{@link #jauC2s} unit vector to spherical coordinates
29473 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
29474 * <li>{@link #jauAnpm} normalize angle into range +/- pi
29475 *</ul>
29476 *
29477 * @version 2016 February 9
29478 *
29479 * @since JSOFA release 20160503
29480 *
29481 * <!--Copyright (C) 2016 IAU SOFA Board. See notes at end. -->
29482 */
29483 public static SphericalCoordinate jauEceq06(double date1, double date2, double dl, double db)
29484 {
29485
29486
29487 /* Spherical to Cartesian. */
29488 double v1[] = jauS2c(dl, db);
29489
29490 /* Rotation matrix, ICRS equatorial to ecliptic. */
29491 double rm[][] = jauEcm06(date1, date2);
29492
29493 /* The transformation from ecliptic to ICRS. */
29494 double v2[] = jauTrxp(rm, v1);
29495
29496 /* Cartesian to spherical. */
29497 SphericalCoordinate co = jauC2s(v2);
29498
29499 /* Express in conventional ranges. */
29500 co.alpha = jauAnp(co.alpha);
29501 co.delta = jauAnpm(co.delta);
29502
29503 return co;
29504 }
29505
29506 /**
29507 *
29508 * ICRS equatorial to ecliptic rotation matrix, IAU 2006.
29509 *
29510 * <p>This function is derived from the International Astronomical Union's
29511 * SOFA (Standards of Fundamental Astronomy) software collection.
29512 *
29513 * <p>Status: support function.
29514 *
29515 * <!-- Given: -->
29516 * @param date1 double TT as a 2-part Julian date (Note 1)
29517 * @param date2 double TT as a 2-part Julian date (Note 1)
29518 *
29519 * <!-- Returned: -->
29520 * @return double[3][3] ICRS to ecliptic rotation matrix
29521 *
29522 * <p>Notes: <ol>
29523 *
29524 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
29525 * convenient way between the two arguments. For example,
29526 * JD(TT)=2450123.7 could be expressed in any of these ways,
29527 * among others:
29528 *
29529 * date1 date2
29530 *
29531 * 2450123.7 0.0 (JD method)
29532 * 2451545.0 -1421.3 (J2000 method)
29533 * 2400000.5 50123.2 (MJD method)
29534 * 2450123.5 0.2 (date & time method)
29535 *
29536 * The JD method is the most natural and convenient to use in
29537 * cases where the loss of several decimal digits of resolution
29538 * is acceptable. The J2000 method is best matched to the way
29539 * the argument is handled internally and will deliver the
29540 * optimum resolution. The MJD method and the date & time methods
29541 * are both good compromises between resolution and convenience.
29542 *
29543 * <li> The matrix is in the sense
29544 *
29545 * E_ep = rm x P_ICRS,
29546 *
29547 * where P_ICRS is a vector with respect to ICRS right ascension
29548 * and declination axes and E_ep is the same vector with respect to
29549 * the (inertial) ecliptic and equinox of date.
29550 *
29551 * <li> P_ICRS is a free vector, merely a direction, typically of unit
29552 * magnitude, and not bound to any particular spatial origin, such
29553 * as the Earth, Sun or SSB. No assumptions are made about whether
29554 * it represents starlight and embodies astrometric effects such as
29555 * parallax or aberration. The transformation is approximately that
29556 * between mean J2000.0 right ascension and declination and ecliptic
29557 * longitude and latitude, with only frame bias (always less than
29558 * 25 mas) to disturb this classical picture.
29559 * </ol>
29560 * Called: <ul>
29561 * <li>{@link #jauObl06} mean obliquity, IAU 2006
29562 * <li>{@link #jauPmat06} PB matrix, IAU 2006
29563 * <li>{@link #jauIr} initialize r-matrix to identity
29564 * <li>{@link #jauRx} rotate around X-axis
29565 * <li>{@link #jauRxr} product of two r-matrices
29566 *</ul>
29567 *
29568 * @version 2015 December 11
29569 *
29570 * @since JSOFA release 20160503
29571 *
29572 * <!--Copyright (C) 2016 IAU SOFA Board. See notes at end. -->
29573 */
29574 public static double[][] jauEcm06(double date1, double date2)
29575 {
29576 double ob, e[][] = new double[3][3];
29577
29578
29579 /* Obliquity, IAU 2006. */
29580 ob = jauObl06(date1, date2);
29581
29582 /* Precession-bias matrix, IAU 2006. */
29583 double bp[][] = jauPmat06(date1, date2);
29584
29585 /* Equatorial of date to ecliptic matrix. */
29586 jauIr(e);
29587 jauRx(ob, e);
29588
29589 /* ICRS to ecliptic coordinates rotation matrix, IAU 2006. */
29590 return jauRxr(e, bp);
29591
29592 }
29593
29594 /**
29595 *
29596 * Transformation from ICRS equatorial coordinates to ecliptic
29597 * coordinates (mean equinox and ecliptic of date) using IAU 2006
29598 * precession model.
29599 *
29600 * <p>This function is derived from the International Astronomical Union's
29601 * SOFA (Standards of Fundamental Astronomy) software collection.
29602 *
29603 * <p>Status: support function.
29604 *
29605 * <!-- Given: -->
29606 * @param date1 double TT as a 2-part Julian date (Note 1)
29607 * @param date2 double TT as a 2-part Julian date (Note 1)
29608 * @param dr double ICRS right ascension and declination (radians)
29609 * @param dd double ICRS right ascension and declination (radians)
29610 *
29611 * <!-- Returned: -->
29612 * @return double ecliptic longitude and latitude (radians)
29613 *<ol>
29614 * <li> The TT date date1+date2 is a Julian Date, apportioned in any
29615 * convenient way between the two arguments. For example,
29616 * JD(TT)=2450123.7 could be expressed in any of these ways,
29617 * among others:
29618 *
29619 * date1 date2
29620 *
29621 * 2450123.7 0.0 (JD method)
29622 * 2451545.0 -1421.3 (J2000 method)
29623 * 2400000.5 50123.2 (MJD method)
29624 * 2450123.5 0.2 (date & time method)
29625 *
29626 * The JD method is the most natural and convenient to use in
29627 * cases where the loss of several decimal digits of resolution
29628 * is acceptable. The J2000 method is best matched to the way
29629 * the argument is handled internally and will deliver the
29630 * optimum resolution. The MJD method and the date & time methods
29631 * are both good compromises between resolution and convenience.
29632 *
29633 * <li> No assumptions are made about whether the coordinates represent
29634 * starlight and embody astrometric effects such as parallax or
29635 * aberration.
29636 *
29637 * <li> The transformation is approximately that from mean J2000.0 right
29638 * ascension and declination to ecliptic longitude and latitude
29639 * (mean equinox and ecliptic of date), with only frame bias (always
29640 * less than 25 mas) to disturb this classical picture.
29641 *</ol>
29642 * Called:<ul>
29643 * <li>{@link #jauS2c} spherical coordinates to unit vector
29644 * <li>{@link #jauEcm06} J2000.0 to ecliptic rotation matrix, IAU 2006
29645 * <li>{@link #jauRxp} product of r-matrix and p-vector
29646 * <li>{@link #jauC2s} unit vector to spherical coordinates
29647 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
29648 * <li>{@link #jauAnpm} normalize angle into range +/- pi
29649 *</ul>
29650 * @version 2016 February 9
29651 *
29652 * @since JSOFA release 20160503
29653 *
29654 * <!--Copyright (C) 2016 IAU SOFA Board. See notes at end. -->
29655 */
29656 public static SphericalCoordinate jauEqec06(double date1, double date2, double dr, double dd)
29657 {
29658
29659 /* Spherical to Cartesian. */
29660 double v1[] = jauS2c(dr, dd);
29661
29662 /* Rotation matrix, ICRS equatorial to ecliptic. */
29663 double rm[][] = jauEcm06(date1, date2);
29664
29665 /* The transformation from ICRS to ecliptic. */
29666 double v2[] = jauRxp(rm, v1);
29667
29668 /* Cartesian to spherical. */
29669 SphericalCoordinate co = jauC2s(v2);
29670
29671 /* Express in conventional ranges. */
29672 co.alpha = jauAnp(co.alpha);
29673 co.delta = jauAnpm(co.delta);
29674 return co;
29675
29676 }
29677
29678 /**
29679 *
29680 * Transformation from ecliptic coordinates (mean equinox and ecliptic
29681 * of date) to ICRS RA,Dec, using a long-term precession model.
29682 *
29683 * <p>This function is derived from the International Astronomical Union's
29684 * SOFA (Standards of Fundamental Astronomy) software collection.
29685 *
29686 * <p>Status: support function.
29687 *
29688 * <!-- Given: -->
29689 * @param epj double Julian epoch (TT)
29690 * @param dl double ecliptic longitude and latitude (radians)
29691 * @param db double ecliptic longitude and latitude (radians)
29692 *
29693 * <!-- Returned: -->
29694 * @return double ICRS right ascension and declination (radians)
29695 *<ol>
29696 * <li> No assumptions are made about whether the coordinates represent
29697 * starlight and embody astrometric effects such as parallax or
29698 * aberration.
29699 *
29700 * <li> The transformation is approximately that from ecliptic longitude
29701 * and latitude (mean equinox and ecliptic of date) to mean J2000.0
29702 * right ascension and declination, with only frame bias (always
29703 * less than 25 mas) to disturb this classical picture.
29704 *
29705 * <li> The Vondrak et al. (2011, 2012) 400 millennia precession model
29706 * agrees with the IAU 2006 precession at J2000.0 and stays within
29707 * 100 microarcseconds during the 20th and 21st centuries. It is
29708 * accurate to a few arcseconds throughout the historical period,
29709 * worsening to a few tenths of a degree at the end of the
29710 * +/- 200,000 year time span.
29711 *</ol>
29712 * Called:<ul>
29713 * <li>{@link #jauS2c} spherical coordinates to unit vector
29714 * <li>{@link #jauLtecm} J2000.0 to ecliptic rotation matrix, long term
29715 * <li>{@link #jauTrxp} product of transpose of r-matrix and p-vector
29716 * <li>{@link #jauC2s} unit vector to spherical coordinates
29717 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
29718 * <li>{@link #jauAnpm} normalize angle into range +/- pi
29719 *</ul>
29720 * References: <ul>
29721 *
29722 * <li>Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession
29723 * expressions, valid for long time intervals, Astron.Astrophys. 534,
29724 * A22
29725 *
29726 * <li>Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession
29727 * expressions, valid for long time intervals (Corrigendum),
29728 * Astron.Astrophys. 541, C1
29729 *</ul>
29730 * @version 2016 February 9
29731 *
29732 * @since JSOFA release 20160503
29733 *
29734 * <!--Copyright (C) 2016 IAU SOFA Board. See notes at end. -->
29735 */
29736 public static SphericalCoordinate jauLteceq(double epj, double dl, double db)
29737 {
29738
29739 /* Spherical to Cartesian. */
29740 double v1[] = jauS2c(dl, db);
29741
29742 /* Rotation matrix, ICRS equatorial to ecliptic. */
29743 double rm[][] = jauLtecm(epj);
29744
29745 /* The transformation from ecliptic to ICRS. */
29746 double v2[] = jauTrxp(rm, v1);
29747
29748 /* Cartesian to spherical. */
29749 SphericalCoordinate co = jauC2s(v2);
29750
29751 /* Express in conventional ranges. */
29752 co.alpha = jauAnp(co.alpha);
29753 co.delta = jauAnpm(co.delta);
29754 return co;
29755
29756 }
29757
29758 /**
29759 *
29760 * ICRS equatorial to ecliptic rotation matrix, long-term.
29761 *
29762 * <p>This function is derived from the International Astronomical Union's
29763 * SOFA (Standards of Fundamental Astronomy) software collection.
29764 *
29765 * <p>Status: support function.
29766 *
29767 * <!-- Given: -->
29768 * @param epj double Julian epoch (TT)
29769 *
29770 * <!-- Returned: -->
29771 * @return double[3][3] ICRS to ecliptic rotation matrix
29772 *
29773 * <p>Notes: <ol>
29774 *
29775 * <li> The matrix is in the sense
29776 *
29777 * E_ep = rm x P_ICRS,
29778 *
29779 * where P_ICRS is a vector with respect to ICRS right ascension
29780 * and declination axes and E_ep is the same vector with respect to
29781 * the (inertial) ecliptic and equinox of epoch epj.
29782 *
29783 * <li> P_ICRS is a free vector, merely a direction, typically of unit
29784 * magnitude, and not bound to any particular spatial origin, such
29785 * as the Earth, Sun or SSB. No assumptions are made about whether
29786 * it represents starlight and embodies astrometric effects such as
29787 * parallax or aberration. The transformation is approximately that
29788 * between mean J2000.0 right ascension and declination and ecliptic
29789 * longitude and latitude, with only frame bias (always less than
29790 * 25 mas) to disturb this classical picture.
29791 *
29792 * <li> The Vondrak et al. (2011, 2012) 400 millennia precession model
29793 * agrees with the IAU 2006 precession at J2000.0 and stays within
29794 * 100 microarcseconds during the 20th and 21st centuries. It is
29795 * accurate to a few arcseconds throughout the historical period,
29796 * worsening to a few tenths of a degree at the end of the
29797 * +/- 200,000 year time span.
29798 *</ol>
29799 * Called:<ul>
29800 * <li>{@link #jauLtpequ} equator pole, long term
29801 * <li>{@link #jauLtpecl} ecliptic pole, long term
29802 * <li>{@link #jauPxp} vector product
29803 * <li>{@link #jauPn} normalize vector
29804 *</ul>
29805 * References:<ul>
29806 *
29807 * <li>Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession
29808 * expressions, valid for long time intervals, Astron.Astrophys. 534,
29809 * A22
29810 *
29811 * <li>Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession
29812 * expressions, valid for long time intervals (Corrigendum),
29813 * Astron.Astrophys. 541, C1
29814 *</ul>
29815 * @version 2015 December 6
29816 *
29817 * @since JSOFA release 20160503
29818 *
29819 * <!--Copyright (C) 2016 IAU SOFA Board. See notes at end. -->
29820 */
29821 public static double[][] jauLtecm(double epj)
29822 {
29823 double rm[][] = new double[3][3];
29824 /* Frame bias (IERS Conventions 2010, Eqs. 5.21 and 5.33) */
29825 final double dx = -0.016617 * DAS2R,
29826 de = -0.0068192 * DAS2R,
29827 dr = -0.0146 * DAS2R;
29828
29829
29830 /* Equator pole. */
29831 double p[] = jauLtpequ(epj);
29832
29833 /* Ecliptic pole (bottom row of equatorial to ecliptic matrix). */
29834 double z[] = jauLtpecl(epj);
29835
29836 /* Equinox (top row of matrix). */
29837 double w[] = jauPxp(p, z);
29838 NormalizedVector nv = jauPn(w);
29839
29840 double x[] = nv.u;
29841 /* Middle row of matrix. */
29842 double y[] = jauPxp(z, x);
29843
29844 /* Combine with frame bias. */
29845 rm[0][0] = x[0] - x[1]*dr + x[2]*dx;
29846 rm[0][1] = x[0]*dr + x[1] + x[2]*de;
29847 rm[0][2] = - x[0]*dx - x[1]*de + x[2];
29848 rm[1][0] = y[0] - y[1]*dr + y[2]*dx;
29849 rm[1][1] = y[0]*dr + y[1] + y[2]*de;
29850 rm[1][2] = - y[0]*dx - y[1]*de + y[2];
29851 rm[2][0] = z[0] - z[1]*dr + z[2]*dx;
29852 rm[2][1] = z[0]*dr + z[1] + z[2]*de;
29853 rm[2][2] = - z[0]*dx - z[1]*de + z[2];
29854
29855 return rm;
29856
29857 }
29858
29859 /**
29860 *
29861 * Transformation from ICRS equatorial coordinates to ecliptic
29862 * coordinates (mean equinox and ecliptic of date) using a long-term
29863 * precession model.
29864 *
29865 * <p>This function is derived from the International Astronomical Union's
29866 * SOFA (Standards of Fundamental Astronomy) software collection.
29867 *
29868 * <p>Status: support function.
29869 *
29870 * <!-- Given: -->
29871 * @param epj double Julian epoch (TT)
29872 * @param dr double ICRS right ascension and declination (radians)
29873 * @param dd double ICRS right ascension and declination (radians)
29874 *
29875 * <!-- Returned: -->
29876 * @return ecliptic longitude and latitude (radians)
29877 *<ol>
29878 * <li> No assumptions are made about whether the coordinates represent
29879 * starlight and embody astrometric effects such as parallax or
29880 * aberration.
29881 *
29882 * <li> The transformation is approximately that from mean J2000.0 right
29883 * ascension and declination to ecliptic longitude and latitude
29884 * (mean equinox and ecliptic of date), with only frame bias (always
29885 * less than 25 mas) to disturb this classical picture.
29886 *
29887 * <li> The Vondrak et al. (2011, 2012) 400 millennia precession model
29888 * agrees with the IAU 2006 precession at J2000.0 and stays within
29889 * 100 microarcseconds during the 20th and 21st centuries. It is
29890 * accurate to a few arcseconds throughout the historical period,
29891 * worsening to a few tenths of a degree at the end of the
29892 * +/- 200,000 year time span.
29893 *</ol>
29894 * Called:<ul>
29895 * <li>{@link #jauS2c} spherical coordinates to unit vector
29896 * <li>{@link #jauLtecm} J2000.0 to ecliptic rotation matrix, long term
29897 * <li>{@link #jauRxp} product of r-matrix and p-vector
29898 * <li>{@link #jauC2s} unit vector to spherical coordinates
29899 * <li>{@link #jauAnp} normalize angle into range 0 to 2pi
29900 * <li>{@link #jauAnpm} normalize angle into range +/- pi
29901 *</ul>
29902 * References:
29903 *
29904 * Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession
29905 * expressions, valid for long time intervals, Astron.Astrophys. 534,
29906 * A22
29907 *
29908 * Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession
29909 * expressions, valid for long time intervals (Corrigendum),
29910 * Astron.Astrophys. 541, C1
29911 *
29912 * @version 2016 February 9
29913 *
29914 * @since JSOFA release 20160503
29915 *
29916 * <!--Copyright (C) 2016 IAU SOFA Board. See notes at end. -->
29917 */
29918 public static SphericalCoordinate jauLteqec(double epj, double dr, double dd)
29919 {
29920
29921 /* Spherical to Cartesian. */
29922 double v1[] = jauS2c(dr, dd);
29923
29924 /* Rotation matrix, ICRS equatorial to ecliptic. */
29925 double rm[][] = jauLtecm(epj);
29926
29927 /* The transformation from ICRS to ecliptic. */
29928 double v2[] = jauRxp(rm, v1);
29929
29930 /* Cartesian to spherical. */
29931 SphericalCoordinate co = jauC2s(v2);
29932
29933 /* Express in conventional ranges. */
29934 co.alpha = jauAnp(co.alpha);
29935 co.delta = jauAnpm(co.delta);
29936
29937 return co;
29938 }
29939
29940 /**
29941 *
29942 * Long-term precession matrix.
29943 *
29944 * <p>This function is derived from the International Astronomical Union's
29945 * SOFA (Standards of Fundamental Astronomy) software collection.
29946 *
29947 * <p>Status: support function.
29948 *
29949 * <!-- Given: -->
29950 * @param epj double Julian epoch (TT)
29951 *
29952 * <!-- Returned: -->
29953 * @return double[3][3] precession matrix, J2000.0 to date
29954 *
29955 * <p>Notes: <ol>
29956 *
29957 * <li> The matrix is in the sense
29958 *
29959 * P_date = rp x P_J2000,
29960 *
29961 * where P_J2000 is a vector with respect to the J2000.0 mean
29962 * equator and equinox and P_date is the same vector with respect to
29963 * the equator and equinox of epoch epj.
29964 *
29965 * <li> The Vondrak et al. (2011, 2012) 400 millennia precession model
29966 * agrees with the IAU 2006 precession at J2000.0 and stays within
29967 * 100 microarcseconds during the 20th and 21st centuries. It is
29968 * accurate to a few arcseconds throughout the historical period,
29969 * worsening to a few tenths of a degree at the end of the
29970 * +/- 200,000 year time span.
29971 *</ol>
29972 * Called:<ul>
29973 * <li>{@link #jauLtpequ} equator pole, long term
29974 * <li>{@link #jauLtpecl} ecliptic pole, long term
29975 * <li>{@link #jauPxp} vector product
29976 * <li>{@link #jauPn} normalize vector
29977 *</ul>
29978 * References:
29979 *
29980 * <p>Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession
29981 * expressions, valid for long time intervals, Astron.Astrophys. 534,
29982 * A22
29983 *
29984 * <p>Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession
29985 * expressions, valid for long time intervals (Corrigendum),
29986 * Astron.Astrophys. 541, C1
29987 *
29988 * @version 2015 December 6
29989 *
29990 * @since JSOFA release 20160503
29991 *
29992 * <!--Copyright (C) 2016 IAU SOFA Board. See notes at end. -->
29993 */
29994 public static double[][] jauLtp(double epj )
29995 {
29996 double rp[][] = new double[3][3];
29997 int i;
29998
29999
30000
30001 /* Equator pole (bottom row of matrix). */
30002 double peqr[] = jauLtpequ(epj);
30003
30004 /* Ecliptic pole. */
30005 double pecl[] = jauLtpecl(epj);
30006
30007 /* Equinox (top row of matrix). */
30008 double v[] = jauPxp(peqr, pecl);
30009 NormalizedVector nv = jauPn(v);
30010
30011 /* Middle row of matrix. */
30012 v = jauPxp(peqr, nv.u);
30013
30014 /* Assemble the matrix. */
30015 for ( i = 0; i < 3; i++ ) {
30016 rp[0][i] = nv.u[i];
30017 rp[1][i] = v[i];
30018 rp[2][i] = peqr[i];
30019 }
30020
30021 return rp;
30022 }
30023
30024
30025 /**
30026 *
30027 * Long-term precession matrix, including ICRS frame bias.
30028 *
30029 * <p>This function is derived from the International Astronomical Union's
30030 * SOFA (Standards of Fundamental Astronomy) software collection.
30031 *
30032 * <p>Status: support function.
30033 *
30034 * <!-- Given: -->
30035 * @param epj double Julian epoch (TT)
30036 *
30037 * <!-- Returned: -->
30038 * @return double[3][3] precession-bias matrix, J2000.0 to date
30039 *
30040 * <p>Notes: <ol>
30041 *
30042 * <li> The matrix is in the sense
30043 *
30044 * P_date = rpb x P_ICRS,
30045 *
30046 * where P_ICRS is a vector in the Geocentric Celestial Reference
30047 * System, and P_date is the vector with respect to the Celestial
30048 * Intermediate Reference System at that date but with nutation
30049 * neglected.
30050 *
30051 * <li> A first order frame bias formulation is used, of sub-
30052 * microarcsecond accuracy compared with a full 3D rotation.
30053 *
30054 * <li> The Vondrak et al. (2011, 2012) 400 millennia precession model
30055 * agrees with the IAU 2006 precession at J2000.0 and stays within
30056 * 100 microarcseconds during the 20th and 21st centuries. It is
30057 * accurate to a few arcseconds throughout the historical period,
30058 * worsening to a few tenths of a degree at the end of the
30059 * +/- 200,000 year time span.
30060 *</ol>
30061 * References:
30062 *
30063 * Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession
30064 * expressions, valid for long time intervals, Astron.Astrophys. 534,
30065 * A22
30066 *
30067 * Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession
30068 * expressions, valid for long time intervals (Corrigendum),
30069 * Astron.Astrophys. 541, C1
30070 *
30071 * @version 2015 December 6
30072 *
30073 * @since JSOFA release 20160503
30074 *
30075 * <!--Copyright (C) 2016 IAU SOFA Board. See notes at end. -->
30076 */
30077 public static double[][] jauLtpb(double epj)
30078 {
30079 double rpb[][] = new double[3][3];
30080 /* Frame bias (IERS Conventions 2010, Eqs. 5.21 and 5.33) */
30081 final double dx = -0.016617 * DAS2R,
30082 de = -0.0068192 * DAS2R,
30083 dr = -0.0146 * DAS2R;
30084
30085 int i;
30086
30087
30088
30089 /* Precession matrix. */
30090 double rp[][] = jauLtp(epj);
30091
30092 /* Apply the bias. */
30093 for ( i = 0; i < 3; i++ ) {
30094 rpb[i][0] = rp[i][0] - rp[i][1]*dr + rp[i][2]*dx;
30095 rpb[i][1] = rp[i][0]*dr + rp[i][1] + rp[i][2]*de;
30096 rpb[i][2] = -rp[i][0]*dx - rp[i][1]*de + rp[i][2];
30097 }
30098
30099 return rpb;
30100 }
30101
30102 /**
30103 *
30104 * Long-term precession of the ecliptic.
30105 *
30106 * <p>This function is derived from the International Astronomical Union's
30107 * SOFA (Standards of Fundamental Astronomy) software collection.
30108 *
30109 * <p>Status: support function.
30110 *
30111 * <!-- Given: -->
30112 * @param epj double Julian epoch (TT)
30113 *
30114 * <!-- Returned: -->
30115 * @return double[3] ecliptic pole unit vector
30116 *
30117 * <p>Notes: <ol>
30118 *
30119 * <li> The returned vector is with respect to the J2000.0 mean equator
30120 * and equinox.
30121 *
30122 * <li> The Vondrak et al. (2011, 2012) 400 millennia precession model
30123 * agrees with the IAU 2006 precession at J2000.0 and stays within
30124 * 100 microarcseconds during the 20th and 21st centuries. It is
30125 * accurate to a few arcseconds throughout the historical period,
30126 * worsening to a few tenths of a degree at the end of the
30127 * +/- 200,000 year time span.
30128 *</ol>
30129 * References:
30130 *
30131 * Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession
30132 * expressions, valid for long time intervals, Astron.Astrophys. 534,
30133 * A22
30134 *
30135 * Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession
30136 * expressions, valid for long time intervals (Corrigendum),
30137 * Astron.Astrophys. 541, C1
30138 *
30139 * @version 2016 February 9
30140 *
30141 * @since JSOFA release 20160503
30142 *
30143 * <!--Copyright (C) 2016 IAU SOFA Board. See notes at end. -->
30144 */
30145 public static double[] jauLtpecl(double epj)
30146 {
30147
30148 double vec[] = new double[3];
30149 /* Obliquity at J2000.0 (radians). */
30150 final double eps0 = 84381.406 * DAS2R;
30151
30152 /* Polynomial coefficients */
30153 final int NPOL = 4 ;
30154 final double pqpol[][] = {
30155 { 5851.607687,
30156 -0.1189000,
30157 -0.00028913,
30158 0.000000101},
30159 {-1600.886300,
30160 1.1689818,
30161 -0.00000020,
30162 -0.000000437}
30163 };
30164
30165 /* Periodic coefficients */
30166 final double pqper[][] = {
30167 { 708.15,-5486.751211,-684.661560, 667.666730,-5523.863691},
30168 {2309.00, -17.127623,2446.283880,-2354.886252, -549.747450},
30169 {1620.00, -617.517403, 399.671049, -428.152441, -310.998056},
30170 { 492.20, 413.442940,-356.652376, 376.202861, 421.535876},
30171 {1183.00, 78.614193,-186.387003, 184.778874, -36.776172},
30172 { 622.00, -180.732815,-316.800070, 335.321713, -145.278396},
30173 { 882.00, -87.676083, 198.296701, -185.138669, -34.744450},
30174 { 547.00, 46.140315, 101.135679, -120.972830, 22.885731}
30175 };
30176 final int NPER = pqper.length;
30177
30178 /* Miscellaneous */
30179 int i;
30180 double t, p, q, w, a, s, c;
30181
30182
30183 /* Centuries since J2000. */
30184 t = ( epj - 2000.0 ) / 100.0;
30185
30186 /* Initialize P_A and Q_A accumulators. */
30187 p = 0.0;
30188 q = 0.0;
30189
30190 /* Periodic terms. */
30191 w = D2PI*t;
30192 for ( i = 0; i < NPER; i++ ) {
30193 a = w/pqper[i][0];
30194 s = sin(a);
30195 c = cos(a);
30196 p += c*pqper[i][1] + s*pqper[i][3];
30197 q += c*pqper[i][2] + s*pqper[i][4];
30198 }
30199
30200 /* Polynomial terms. */
30201 w = 1.0;
30202 for ( i = 0; i < NPOL; i++ ) {
30203 p += pqpol[0][i]*w;
30204 q += pqpol[1][i]*w;
30205 w *= t;
30206 }
30207
30208 /* P_A and Q_A (radians). */
30209 p *= DAS2R;
30210 q *= DAS2R;
30211
30212 /* Form the ecliptic pole vector. */
30213 w = 1.0 - p*p - q*q;
30214 w = w < 0.0 ? 0.0 : sqrt(w);
30215 s = sin(eps0);
30216 c = cos(eps0);
30217 vec[0] = p;
30218 vec[1] = - q*c - w*s;
30219 vec[2] = - q*s + w*c;
30220
30221 return vec;
30222
30223 }
30224
30225 /**
30226 *
30227 * Long-term precession of the equator.
30228 *
30229 * <p>This function is derived from the International Astronomical Union's
30230 * SOFA (Standards of Fundamental Astronomy) software collection.
30231 *
30232 * <p>Status: support function.
30233 *
30234 * <!-- Given: -->
30235 * @param epj double Julian epoch (TT)
30236 *
30237 * <!-- Returned: -->
30238 * @return double[3] equator pole unit vector
30239 *
30240 * <p>Notes: <ol>
30241 *
30242 * <li> The returned vector is with respect to the J2000.0 mean equator
30243 * and equinox.
30244 *
30245 * <li> The Vondrak et al. (2011, 2012) 400 millennia precession model
30246 * agrees with the IAU 2006 precession at J2000.0 and stays within
30247 * 100 microarcseconds during the 20th and 21st centuries. It is
30248 * accurate to a few arcseconds throughout the historical period,
30249 * worsening to a few tenths of a degree at the end of the
30250 * +/- 200,000 year time span.
30251 *</ol>
30252 * References:
30253 *
30254 * Vondrak, J., Capitaine, N. and Wallace, P., 2011, New precession
30255 * expressions, valid for long time intervals, Astron.Astrophys. 534,
30256 * A22
30257 *
30258 * Vondrak, J., Capitaine, N. and Wallace, P., 2012, New precession
30259 * expressions, valid for long time intervals (Corrigendum),
30260 * Astron.Astrophys. 541, C1
30261 *
30262 * @version 2016 February 9
30263 *
30264 * @since JSOFA release 20160503
30265 *
30266 * <!--Copyright (C) 2016 IAU SOFA Board. See notes at end. -->
30267 */
30268 public static double[] jauLtpequ(double epj)
30269 {
30270 double veq[] = new double[3];
30271 /* Polynomial coefficients */
30272 final int NPOL = 4;
30273 final double xypol[][] = {
30274 { 5453.282155,
30275 0.4252841,
30276 -0.00037173,
30277 -0.000000152},
30278 {-73750.930350,
30279 -0.7675452,
30280 -0.00018725,
30281 0.000000231}
30282 };
30283
30284 /* Periodic coefficients */
30285 final double xyper[][] = {
30286 { 256.75, -819.940624,75004.344875,81491.287984, 1558.515853},
30287 { 708.15,-8444.676815, 624.033993, 787.163481, 7774.939698},
30288 { 274.20, 2600.009459, 1251.136893, 1251.296102,-2219.534038},
30289 { 241.45, 2755.175630,-1102.212834,-1257.950837,-2523.969396},
30290 {2309.00, -167.659835,-2660.664980,-2966.799730, 247.850422},
30291 { 492.20, 871.855056, 699.291817, 639.744522, -846.485643},
30292 { 396.10, 44.769698, 153.167220, 131.600209,-1393.124055},
30293 { 288.90, -512.313065, -950.865637, -445.040117, 368.526116},
30294 { 231.10, -819.415595, 499.754645, 584.522874, 749.045012},
30295 {1610.00, -538.071099, -145.188210, -89.756563, 444.704518},
30296 { 620.00, -189.793622, 558.116553, 524.429630, 235.934465},
30297 { 157.87, -402.922932, -23.923029, -13.549067, 374.049623},
30298 { 220.30, 179.516345, -165.405086, -210.157124, -171.330180},
30299 {1200.00, -9.814756, 9.344131, -44.919798, -22.899655}
30300 };
30301 final int NPER = xyper.length;
30302
30303 /* Miscellaneous */
30304 int i;
30305 double t, x, y, w, a, s, c;
30306
30307
30308 /* Centuries since J2000. */
30309 t = ( epj - 2000.0 ) / 100.0;
30310
30311 /* Initialize X and Y accumulators. */
30312 x = 0.0;
30313 y = 0.0;
30314
30315 /* Periodic terms. */
30316 w = D2PI * t;
30317 for ( i = 0; i < NPER; i++ ) {
30318 a = w / xyper[i][0];
30319 s = sin(a);
30320 c = cos(a);
30321 x += c*xyper[i][1] + s*xyper[i][3];
30322 y += c*xyper[i][2] + s*xyper[i][4];
30323 }
30324
30325 /* Polynomial terms. */
30326 w = 1.0;
30327 for ( i = 0; i < NPOL; i++ ) {
30328 x += xypol[0][i]*w;
30329 y += xypol[1][i]*w;
30330 w *= t;
30331 }
30332
30333 /* X and Y (direction cosines). */
30334 x *= DAS2R;
30335 y *= DAS2R;
30336
30337 /* Form the equator pole vector. */
30338 veq[0] = x;
30339 veq[1] = y;
30340 w = 1.0 - x*x - y*y;
30341 veq[2] = w < 0.0 ? 0.0 : sqrt(w);
30342
30343
30344 return veq;
30345
30346 }
30347
30348 /**
30349 * Position consisting of (ha, declination) pairs in radians. Where ha is hour angle and dec is declination .
30350 * @author Paul Harrison (paul.harrison@manchester.ac.uk) 1 Feb 2010
30351 *
30352 * @since JSOFA release 20180130
30353 */
30354 public static class EquatorialCoordinate {
30355 public double ha;
30356 public double dec;
30357 public EquatorialCoordinate(double ha, double dec){
30358 this.ha = ha;
30359 this.dec = dec;
30360 }
30361 }
30362
30363 /**
30364 *
30365 * Horizon to equatorial coordinates: transform azimuth and altitude
30366 * to hour angle and declination.
30367 *
30368 * <!-- Given: -->
30369 * @param az double azimuth
30370 * @param el double altitude (informally, elevation)
30371 * @param phi double site latitude
30372 *
30373 * <!-- Returned: -->
30374 * @return ha double hour angle (local)
30375 * dec double declination
30376 *
30377 * <p>Notes: <ol>
30378 *
30379 * <li> All the arguments are angles in radians.
30380 *
30381 * <li> The sign convention for azimuth is north zero, east +pi/2.
30382 *
30383 * <li> HA is returned in the range +/-pi. Declination is returned in
30384 * the range +/-pi/2.
30385 *
30386 * <li> The latitude phi is pi/2 minus the angle between the Earth's
30387 * rotation axis and the adopted zenith. In many applications it
30388 * will be sufficient to use the published geodetic latitude of the
30389 * site. In very precise (sub-arcsecond) applications, phi can be
30390 * corrected for polar motion.
30391 *
30392 * <li> The azimuth az must be with respect to the rotational north pole,
30393 * as opposed to the ITRS pole, and an azimuth with respect to north
30394 * on a map of the Earth's surface will need to be adjusted for
30395 * polar motion if sub-arcsecond accuracy is required.
30396 *
30397 * <li> Should the user wish to work with respect to the astronomical
30398 * zenith rather than the geodetic zenith, phi will need to be
30399 * adjusted for deflection of the vertical (often tens of
30400 * arcseconds), and the zero point of ha will also be affected.
30401 *
30402 * <li> The transformation is the same as Ve = Ry(phi-pi/2)*Rz(pi)*Vh,
30403 * where Ve and Vh are lefthanded unit vectors in the (ha,dec) and
30404 * (az,el) systems respectively and Rz and Ry are rotations about
30405 * first the z-axis and then the y-axis. (n.b. Rz(pi) simply
30406 * reverses the signs of the x and y components.) For efficiency,
30407 * the algorithm is written out rather than calling other utility
30408 * functions. For applications that require even greater
30409 * efficiency, additional savings are possible if constant terms
30410 * such as functions of latitude are computed once and for all.
30411 *
30412 * <li> Again for efficiency, no range checking of arguments is carried
30413 * out.
30414 *</ol>
30415 * Last revision: 2017 September 12
30416 *
30417 * @since JSOFA release 20180130
30418 *
30419 */
30420
30421 public static EquatorialCoordinate jauAe2hd (double az, double el, double phi)
30422 {
30423 double sa, ca, se, ce, sp, cp, x, y, z, r;
30424
30425
30426 /* Useful trig functions. */
30427 sa = sin(az);
30428 ca = cos(az);
30429 se = sin(el);
30430 ce = cos(el);
30431 sp = sin(phi);
30432 cp = cos(phi);
30433
30434 /* HA,Dec unit vector. */
30435 x = - ca*ce*sp + se*cp;
30436 y = - sa*ce;
30437 z = ca*ce*cp + se*sp;
30438
30439 /* To spherical. */
30440 r = sqrt(x*x + y*y);
30441 return new EquatorialCoordinate( (r != 0.0) ? atan2(y,x) : 0.0,
30442 atan2(z,r));
30443
30444 /* Finished. */
30445 }
30446
30447
30448 /**
30449 * Position consisting of (az, el) pairs in radians. Where az is the azimuth and el is elevation .
30450 * @author Paul Harrison (paul.harrison@manchester.ac.uk)
30451 *
30452 * @since JSOFA release 20180130
30453 */
30454 public static class HorizonCoordinate {
30455 public double az;
30456 public double el;
30457 public HorizonCoordinate(double az, double el){
30458 this.az = az;
30459 this.el = el;
30460 }
30461 }
30462
30463
30464 /**
30465 *
30466 * Equatorial to horizon coordinates: transform hour angle and
30467 * declination to azimuth and altitude.
30468 *
30469 * <p>This function is derived from the International Astronomical Union's
30470 * SOFA (Standards of Fundamental Astronomy) software collection.
30471 *
30472 * <p>Status: support function.
30473 *
30474 * <!-- Given: -->
30475 * @param ha double hour angle (local)
30476 * @param dec double declination
30477 * @param phi double site latitude
30478 *
30479 * <!-- Returned: -->
30480 * @return az double azimuth
30481 * el double altitude (informally, elevation)
30482 *
30483 * <p>Notes: <ol>
30484 *
30485 * <li> All the arguments are angles in radians.
30486 *
30487 * <li> Azimuth is returned in the range 0-2pi; north is zero, and east
30488 * is +pi/2. Altitude is returned in the range +/- pi/2.
30489 *
30490 * <li> The latitude phi is pi/2 minus the angle between the Earth's
30491 * rotation axis and the adopted zenith. In many applications it
30492 * will be sufficient to use the published geodetic latitude of the
30493 * site. In very precise (sub-arcsecond) applications, phi can be
30494 * corrected for polar motion.
30495 *
30496 * <li> The returned azimuth az is with respect to the rotational north
30497 * pole, as opposed to the ITRS pole, and for sub-arcsecond
30498 * accuracy will need to be adjusted for polar motion if it is to
30499 * be with respect to north on a map of the Earth's surface.
30500 *
30501 * <li> Should the user wish to work with respect to the astronomical
30502 * zenith rather than the geodetic zenith, phi will need to be
30503 * adjusted for deflection of the vertical (often tens of
30504 * arcseconds), and the zero point of the hour angle ha will also
30505 * be affected.
30506 *
30507 * <li> The transformation is the same as Vh = Rz(pi)*Ry(pi/2-phi)*Ve,
30508 * where Vh and Ve are lefthanded unit vectors in the (az,el) and
30509 * (ha,dec) systems respectively and Ry and Rz are rotations about
30510 * first the y-axis and then the z-axis. (n.b. Rz(pi) simply
30511 * reverses the signs of the x and y components.) For efficiency,
30512 * the algorithm is written out rather than calling other utility
30513 * functions. For applications that require even greater
30514 * efficiency, additional savings are possible if constant terms
30515 * such as functions of latitude are computed once and for all.
30516 *
30517 * <li> Again for efficiency, no range checking of arguments is carried
30518 * out.
30519 *</ol>
30520 * Last revision: 2017 September 12
30521 *
30522 * @since JSOFA release 20180130
30523 *
30524 */
30525 public static HorizonCoordinate jauHd2ae (double ha, double dec, double phi)
30526 {
30527 double sh, ch, sd, cd, sp, cp, x, y, z, r, a;
30528
30529
30530 /* Useful trig functions. */
30531 sh = sin(ha);
30532 ch = cos(ha);
30533 sd = sin(dec);
30534 cd = cos(dec);
30535 sp = sin(phi);
30536 cp = cos(phi);
30537
30538 /* Az,Alt unit vector. */
30539 x = - ch*cd*sp + sd*cp;
30540 y = - sh*cd;
30541 z = ch*cd*cp + sd*sp;
30542
30543 /* To spherical. */
30544 r = sqrt(x*x + y*y);
30545 a = (r != 0.0) ? atan2(y,x) : 0.0;
30546 return new HorizonCoordinate((a < 0.0) ? a+D2PI : a,
30547 atan2(z,r));
30548
30549 /* Finished. */
30550 }
30551
30552
30553 /**
30554 *
30555 * Parallactic angle for a given hour angle and declination.
30556 *
30557 * <p>This function is derived from the International Astronomical Union's
30558 * SOFA (Standards of Fundamental Astronomy) software collection.
30559 *
30560 * <p>Status: support function.
30561 *
30562 * <!-- Given: -->
30563 * @param ha double hour angle
30564 * @param dec double declination
30565 * @param phi double site latitude
30566 *
30567 * Returned (function value):
30568 * double parallactic angle
30569 *
30570 * <p>Notes: <ol>
30571 *
30572 * <li> All the arguments are angles in radians.
30573 *
30574 * <li> The parallactic angle at a point in the sky is the position
30575 * angle of the vertical, i.e. the angle between the directions to
30576 * the north celestial pole and to the zenith respectively.
30577 *
30578 * <li> The result is returned in the range -pi to +pi.
30579 *
30580 * <li> At the pole itself a zero result is returned.
30581 *
30582 * <li> The latitude phi is pi/2 minus the angle between the Earth's
30583 * rotation axis and the adopted zenith. In many applications it
30584 * will be sufficient to use the published geodetic latitude of the
30585 * site. In very precise (sub-arcsecond) applications, phi can be
30586 * corrected for polar motion.
30587 *
30588 * <li> Should the user wish to work with respect to the astronomical
30589 * zenith rather than the geodetic zenith, phi will need to be
30590 * adjusted for deflection of the vertical (often tens of
30591 * arcseconds), and the zero point of the hour angle ha will also
30592 * be affected.
30593 *</ol>
30594 * Reference:
30595 * Smart, W.M., "Spherical Astronomy", Cambridge University Press,
30596 * 6th edition (Green, 1977), p49.
30597 *
30598 * Last revision: 2017 September 12
30599 *
30600 * @since JSOFA release 20180130
30601 *
30602 */
30603 public static double jauHd2pa (double ha, double dec, double phi)
30604 {
30605 double cp, cqsz, sqsz;
30606
30607
30608 cp = cos(phi);
30609 sqsz = cp*sin(ha);
30610 cqsz = sin(phi)*cos(dec) - cp*sin(dec)*cos(ha);
30611 return ( ( sqsz != 0.0 || cqsz != 0.0 ) ? atan2(sqsz,cqsz) : 0.0 );
30612
30613 /* Finished. */
30614 }
30615
30616
30617 /**
30618 * Tangent point soulutions. A class to contain tangent point soutions and an indication as to how many of the solutions are valid
30619 * @author Paul Harrison (paul.harrison@manchester.ac.uk)
30620 * @since JSOFA release 20180130
30621 */
30622 public static class TangentPointSolution
30623 {
30624 public SphericalCoordinate sol1;
30625 public SphericalCoordinate sol2;
30626
30627 /** nsolutions. The number of useful solutions
30628 */
30629 public int nsolutions;
30630 /**
30631 * @param sol1
30632 * @param sol2
30633 * @param flag
30634 */
30635 public TangentPointSolution(SphericalCoordinate sol1,
30636 SphericalCoordinate sol2, int flag) {
30637 this.sol1 = sol1;
30638 this.sol2 = sol2;
30639 this.nsolutions = flag;
30640 }
30641 public TangentPointSolution()
30642 {
30643 this.sol1 = null;
30644 this.sol2 = null;
30645 this.nsolutions = 0;
30646 }
30647 }
30648 /**
30649 *
30650 * In the tangent plane projection, given the rectangular coordinates
30651 * of a star and its spherical coordinates, determine the spherical
30652 * coordinates of the tangent point.
30653 *
30654 * <p>This function is derived from the International Astronomical Union's
30655 * SOFA (Standards of Fundamental Astronomy) software collection.
30656 *
30657 * <p>Status: support function.
30658 *
30659 * <!-- Given: -->
30660 * @param xi double rectangular coordinates of star image (Note 2)
30661 * @param eta double rectangular coordinates of star image (Note 2)
30662 * @param a double star's spherical coordinates (Note 3)
30663 * @param b double star's spherical coordinates (Note 3)
30664 *
30665 * <!-- Returned: -->
30666 * @return tangent point's spherical coordinate solutions
30667 *
30668 * Returned (function value):
30669 * int number of solutions:
30670 * 0 = no solutions returned (Note 5)
30671 * 1 = only the first solution is useful (Note 6)
30672 * 2 = both solutions are useful (Note 6)
30673 *
30674 * <p>Notes: <ol>
30675 *
30676 * <li> The tangent plane projection is also called the "gnomonic
30677 * projection" and the "central projection".
30678 *
30679 * <li> The eta axis points due north in the adopted coordinate system.
30680 * If the spherical coordinates are observed (RA,Dec), the tangent
30681 * plane coordinates (xi,eta) are conventionally called the
30682 * "standard coordinates". If the spherical coordinates are with
30683 * respect to a right-handed triad, (xi,eta) are also right-handed.
30684 * The units of (xi,eta) are, effectively, radians at the tangent
30685 * point.
30686 *
30687 * <li> All angular arguments are in radians.
30688 *
30689 * <li> The angles a01 and a02 are returned in the range 0-2pi. The
30690 * angles b01 and b02 are returned in the range +/-pi, but in the
30691 * usual, non-pole-crossing, case, the range is +/-pi/2.
30692 *
30693 * <li> Cases where there is no solution can arise only near the poles.
30694 * For example, it is clearly impossible for a star at the pole
30695 * itself to have a non-zero xi value, and hence it is meaningless
30696 * to ask where the tangent point would have to be to bring about
30697 * this combination of xi and dec.
30698 *
30699 * <li> Also near the poles, cases can arise where there are two useful
30700 * solutions. The return value indicates whether the second of the
30701 * two solutions returned is useful; 1 indicates only one useful
30702 * solution, the usual case.
30703 *
30704 * <li> The basis of the algorithm is to solve the spherical triangle PSC,
30705 * where P is the north celestial pole, S is the star and C is the
30706 * tangent point. The spherical coordinates of the tangent point are
30707 * [a0,b0]; writing rho^2 = (xi^2+eta^2) and r^2 = (1+rho^2), side c
30708 * is then (pi/2-b), side p is sqrt(xi^2+eta^2) and side s (to be
30709 * found) is (pi/2-b0). Angle C is given by sin(C) = xi/rho and
30710 * cos(C) = eta/rho. Angle P (to be found) is the longitude
30711 * difference between star and tangent point (a-a0).
30712 *
30713 * <li> This function is a member of the following set:
30714 * <pre
30715 *{@code
30716 * spherical vector solve for
30717 *
30718 * iauTpxes iauTpxev xi,eta
30719 * iauTpsts iauTpstv star
30720 * > iauTpors < iauTporv origin
30721 *}
30722 *</ol>
30723 * Called:
30724 * iauAnp normalize angle into range 0 to 2pi
30725 *
30726 * References:
30727 *
30728 * Calabretta M.R. & Greisen, E.W., 2002, "Representations of
30729 * celestial coordinates in FITS", Astron.Astrophys. 395, 1077
30730 *
30731 * Green, R.M., "Spherical Astronomy", Cambridge University Press,
30732 * 1987, Chapter 13.
30733 *
30734 * @version 2018 January 2
30735 *
30736 * @since JSOFA release 20180130
30737 *
30738 */
30739 public static TangentPointSolution jauTpors(double xi, double eta, double a, double b)
30740 {
30741 double xi2, r, sb, cb, rsb, rcb, w2, w, s, c;
30742 double a01, b01, a02, b02;
30743
30744
30745 xi2 = xi*xi;
30746 r = sqrt(1.0 + xi2 + eta*eta);
30747 sb = sin(b);
30748 cb = cos(b);
30749 rsb = r*sb;
30750 rcb = r*cb;
30751 w2 = rcb*rcb - xi2;
30752 if ( w2 >= 0.0 ) {
30753 w = sqrt(w2);
30754 s = rsb - eta*w;
30755 c = rsb*eta + w;
30756 if ( xi == 0.0 && w == 0.0 ) w = 1.0;
30757 a01 = jauAnp(a - atan2(xi,w));
30758 b01 = atan2(s,c);
30759 w = -w;
30760 s = rsb - eta*w;
30761 c = rsb*eta + w;
30762 a02 = jauAnp(a - atan2(xi,w));
30763 b02 = atan2(s,c);
30764 return new TangentPointSolution(new SphericalCoordinate(a01, b01), new SphericalCoordinate(a02, b02),
30765 (abs(rsb) < 1.0) ? 1 : 2);
30766 } else {
30767 return new TangentPointSolution();
30768 }
30769
30770 /* Finished. */
30771
30772 }
30773
30774 /**
30775 * Tangent point soutions as direction cosines. A container class for two possible solutiuons as well as an indication of the number of valid solutions.
30776 * @author Paul Harrison (paul.harrison@manchester.ac.uk)
30777 * @since 27 Mar 2018
30778 */
30779 public static class TangentPointDirectionCosines {
30780 public double dc1[];
30781 public double dc2[];
30782 /** nsolution. number of valid solutions.
30783 */
30784 public int nsolution;
30785 /**
30786 * @param dc1 direction cosines
30787 * @param dc2 direction cosines
30788 * @param nsolution number of valid solutions
30789 */
30790 public TangentPointDirectionCosines(double[] dc1, double[] dc2,
30791 int nsolution) {
30792 this.dc1 = dc1;
30793 this.dc2 = dc2;
30794 this.nsolution = nsolution;
30795 }
30796 /**
30797 *
30798 */
30799 public TangentPointDirectionCosines() {
30800 this.nsolution = 0;
30801 }
30802
30803 }
30804 /**
30805 *
30806 * In the tangent plane projection, given the rectangular coordinates
30807 * of a star and its direction cosines, determine the direction
30808 * cosines of the tangent point.
30809 *
30810 * <p>This function is derived from the International Astronomical Union's
30811 * SOFA (Standards of Fundamental Astronomy) software collection.
30812 *
30813 * <p>Status: support function.
30814 *
30815 * <!-- Given: -->
30816 * @param xi double rectangular coordinates of star image (Note 2)
30817 * @param eta double rectangular coordinates of star image (Note 2)
30818 * @param v double[3] star's direction cosines (Note 3)
30819 *
30820 * <!-- Returned: -->
30821 * @return tangent point's direction cosines, Solutions 1 & 2
30822 * int number of solutions:
30823 * 0 = no solutions returned (Note 4)
30824 * 1 = only the first solution is useful (Note 5)
30825 * 2 = both solutions are useful (Note 5)
30826 *
30827 * <p>Notes: <ol>
30828 *
30829 * <li> The tangent plane projection is also called the "gnomonic
30830 * projection" and the "central projection".
30831 *
30832 * <li> The eta axis points due north in the adopted coordinate system.
30833 * If the direction cosines represent observed (RA,Dec), the tangent
30834 * plane coordinates (xi,eta) are conventionally called the
30835 * "standard coordinates". If the direction cosines are with
30836 * respect to a right-handed triad, (xi,eta) are also right-handed.
30837 * The units of (xi,eta) are, effectively, radians at the tangent
30838 * point.
30839 *
30840 * <li> The vector v must be of unit length or the result will be wrong.
30841 *
30842 * <li> Cases where there is no solution can arise only near the poles.
30843 * For example, it is clearly impossible for a star at the pole
30844 * itself to have a non-zero xi value, and hence it is meaningless
30845 * to ask where the tangent point would have to be.
30846 *
30847 * <li> Also near the poles, cases can arise where there are two useful
30848 * solutions. The return value indicates whether the second of the
30849 * two solutions returned is useful; 1 indicates only one useful
30850 * solution, the usual case.
30851 *
30852 * <li> The basis of the algorithm is to solve the spherical triangle
30853 * PSC, where P is the north celestial pole, S is the star and C is
30854 * the tangent point. Calling the celestial spherical coordinates
30855 * of the star and tangent point (a,b) and (a0,b0) respectively, and
30856 * writing rho^2 = (xi^2+eta^2) and r^2 = (1+rho^2), and
30857 * transforming the vector v into (a,b) in the normal way, side c is
30858 * then (pi/2-b), side p is sqrt(xi^2+eta^2) and side s (to be
30859 * found) is (pi/2-b0), while angle C is given by sin(C) = xi/rho
30860 * and cos(C) = eta/rho; angle P (to be found) is (a-a0). After
30861 * solving the spherical triangle, the result (a0,b0) can be
30862 * expressed in vector form as v0.
30863 *
30864 * <li> This function is a member of the following set:
30865 * {@code
30866 * spherical vector solve for
30867 *
30868 * iauTpxes iauTpxev xi,eta
30869 * iauTpsts iauTpstv star
30870 * iauTpors > iauTporv < origin
30871 * }
30872 *</ol>
30873 * References:
30874 *
30875 * Calabretta M.R. & Greisen, E.W., 2002, "Representations of
30876 * celestial coordinates in FITS", Astron.Astrophys. 395, 1077
30877 *
30878 * Green, R.M., "Spherical Astronomy", Cambridge University Press,
30879 * 1987, Chapter 13.
30880 *
30881 * @version 2018 January 2
30882 *
30883 * @since JSOFA release 20180130
30884 *
30885 */
30886
30887 public static TangentPointDirectionCosines jauTporv(double xi, double eta, double v[])
30888 {
30889 double x, y, z, rxy2, xi2, eta2p1, r, rsb, rcb, w2, w, c;
30890 double v01[] = new double[3];
30891 double v02[] = new double[3];
30892
30893 x = v[0];
30894 y = v[1];
30895 z = v[2];
30896 rxy2 = x*x + y*y;
30897 xi2 = xi*xi;
30898 eta2p1 = eta*eta + 1.0;
30899 r = sqrt(xi2 + eta2p1);
30900 rsb = r*z;
30901 rcb = r*sqrt(x*x + y*y);
30902 w2 = rcb*rcb - xi2;
30903 if ( w2 > 0.0 ) {
30904 w = sqrt(w2);
30905 c = (rsb*eta + w) / (eta2p1*sqrt(rxy2*(w2+xi2)));
30906 v01[0] = c * (x*w + y*xi);
30907 v01[1] = c * (y*w - x*xi);
30908 v01[2] = (rsb - eta*w) / eta2p1;
30909 w = - w;
30910 c = (rsb*eta + w) / (eta2p1*sqrt(rxy2*(w2+xi2)));
30911 v02[0] = c * (x*w + y*xi);
30912 v02[1] = c * (y*w - x*xi);
30913 v02[2] = (rsb - eta*w) / eta2p1;
30914 return new TangentPointDirectionCosines(v01,v02,(abs(rsb) < 1.0) ? 1 : 2);
30915 } else {
30916 return new TangentPointDirectionCosines();
30917 }
30918
30919 /* Finished. */
30920 }
30921
30922 /**
30923 *
30924 * In the tangent plane projection, given the star's rectangular
30925 * coordinates and the spherical coordinates of the tangent point,
30926 * solve for the spherical coordinates of the star.
30927 *
30928 * <p>This function is derived from the International Astronomical Union's
30929 * SOFA (Standards of Fundamental Astronomy) software collection.
30930 *
30931 * <p>Status: support function.
30932 *
30933 * <!-- Given: -->
30934 * @param xi double rectangular coordinates of star image (Note 2)
30935 * @param eta double rectangular coordinates of star image (Note 2)
30936 * @param a0 double tangent point's spherical coordinates
30937 * @param b0 double tangent point's spherical coordinates
30938 *
30939 * <!-- Returned: -->
30940 * @return star's spherical coordinates
30941 *<ol>
30942 * <li> The tangent plane projection is also called the "gnomonic
30943 * projection" and the "central projection".
30944 *
30945 * <li> The eta axis points due north in the adopted coordinate system.
30946 * If the spherical coordinates are observed (RA,Dec), the tangent
30947 * plane coordinates (xi,eta) are conventionally called the
30948 * "standard coordinates". If the spherical coordinates are with
30949 * respect to a right-handed triad, (xi,eta) are also right-handed.
30950 * The units of (xi,eta) are, effectively, radians at the tangent
30951 * point.
30952 *
30953 * <li> All angular arguments are in radians.
30954 *
30955 * <li> This function is a member of the following set:
30956 *{@code
30957 * spherical vector solve for
30958 *
30959 * iauTpxes iauTpxev xi,eta
30960 * > iauTpsts < iauTpstv star
30961 * iauTpors iauTporv origin
30962 * }
30963 *</ol>
30964 * Called:
30965 * iauAnp normalize angle into range 0 to 2pi
30966 *
30967 * References:
30968 *
30969 * Calabretta M.R. & Greisen, E.W., 2002, "Representations of
30970 * celestial coordinates in FITS", Astron.Astrophys. 395, 1077
30971 *
30972 * Green, R.M., "Spherical Astronomy", Cambridge University Press,
30973 * 1987, Chapter 13.
30974 *
30975 * @version 2018 January 2
30976 *
30977 * @since JSOFA release 20180130
30978 *
30979 */
30980 public static SphericalCoordinate jauTpsts(double xi, double eta, double a0, double b0)
30981 {
30982 double sb0, cb0, d;
30983
30984 sb0 = sin(b0);
30985 cb0 = cos(b0);
30986 d = cb0 - eta*sb0;
30987 return new SphericalCoordinate( jauAnp(atan2(xi,d) + a0),
30988 atan2(sb0+eta*cb0, sqrt(xi*xi+d*d)));
30989
30990 /* Finished. */
30991 }
30992
30993 /**
30994 * Tangent Plane Position consisting of (xi, eta) pairs in radians.
30995 *
30996 *
30997 * <p>Notes: <ol>
30998 *
30999 * <li> The tangent plane projection is also called the "gnomonic
31000 * projection" and the "central projection".
31001 *
31002 * <li> The eta axis points due north in the adopted coordinate system.
31003 * If the spherical coordinates are observed (RA,Dec), the tangent
31004 * plane coordinates (xi,eta) are conventionally called the
31005 * "standard coordinates". For right-handed spherical coordinates,
31006 * (xi,eta) are also right-handed. The units of (xi,eta) are,
31007 * effectively, radians at the tangent point.
31008 * </ol>
31009 * @author Paul Harrison (paul.harrison@manchester.ac.uk)
31010 *
31011 * @since JSOFA release 20180130
31012 */
31013 public static class TangentPlaneCoordinate {
31014 public double xi;
31015 public double eta;
31016 /** status.
31017 * 0 = OK
31018 * 1 = star too far from axis
31019 * 2 = antistar on tangent plane
31020 * 3 = antistar too far from axis
31021 */
31022 public int status;
31023 public TangentPlaneCoordinate(double xi, double eta, int j){
31024 this.xi = xi;
31025 this.eta = eta;
31026 this.status = j;
31027 }
31028 }
31029
31030
31031 /**
31032 *
31033 * In the tangent plane projection, given the star's rectangular
31034 * coordinates and the direction cosines of the tangent point, solve
31035 * for the direction cosines of the star.
31036 *
31037 * <p>This function is derived from the International Astronomical Union's
31038 * SOFA (Standards of Fundamental Astronomy) software collection.
31039 *
31040 * <p>Status: support function.
31041 *
31042 * <!-- Given: -->
31043 * @param xi double rectangular coordinates of star image (Note 2)
31044 * @param eta double rectangular coordinates of star image (Note 2)
31045 * @param v0 double[3] tangent point's direction cosines
31046 *
31047 * <!-- Returned: -->
31048 * @return double[3] star's direction cosines
31049 * <ol>
31050 * <li> The tangent plane projection is also called the "gnomonic
31051 * projection" and the "central projection".
31052 *
31053 * <li> The eta axis points due north in the adopted coordinate system.
31054 * If the direction cosines represent observed (RA,Dec), the tangent
31055 * plane coordinates (xi,eta) are conventionally called the
31056 * "standard coordinates". If the direction cosines are with
31057 * respect to a right-handed triad, (xi,eta) are also right-handed.
31058 * The units of (xi,eta) are, effectively, radians at the tangent
31059 * point.
31060 *
31061 * <li> The method used is to complete the star vector in the (xi,eta)
31062 * based triad and normalize it, then rotate the triad to put the
31063 * tangent point at the pole with the x-axis aligned to zero
31064 * longitude. Writing (a0,b0) for the celestial spherical
31065 * coordinates of the tangent point, the sequence of rotations is
31066 * (b-pi/2) around the x-axis followed by (-a-pi/2) around the
31067 * z-axis.
31068 *
31069 * <li> If vector v0 is not of unit length, the returned vector v will
31070 * be wrong.
31071 *
31072 * <li> If vector v0 points at a pole, the returned vector v will be
31073 * based on the arbitrary assumption that the longitude coordinate
31074 * of the tangent point is zero.
31075 *
31076 * <li> This function is a member of the following set:
31077 *{@code
31078 * spherical vector solve for
31079 *
31080 * iauTpxes iauTpxev xi,eta
31081 * iauTpsts > iauTpstv < star
31082 * iauTpors iauTporv origin
31083 * }
31084 *</ol>
31085 * References:
31086 *
31087 * Calabretta M.R. & Greisen, E.W., 2002, "Representations of
31088 * celestial coordinates in FITS", Astron.Astrophys. 395, 1077
31089 *
31090 * Green, R.M., "Spherical Astronomy", Cambridge University Press,
31091 * 1987, Chapter 13.
31092 *
31093 * @version 2018 January 2
31094 *
31095 * @since JSOFA release 20180130
31096 *
31097 */
31098 public static double[] jauTpstv(double xi, double eta, double v0[])
31099 {
31100 double x, y, z, f, r;
31101 double v[] = new double[3];
31102
31103
31104 /* Tangent point. */
31105 x = v0[0];
31106 y = v0[1];
31107 z = v0[2];
31108
31109 /* Deal with polar case. */
31110 r = sqrt(x*x + y*y);
31111 if ( r == 0.0 ) {
31112 r = 1e-20;
31113 x = r;
31114 }
31115
31116 /* Star vector length to tangent plane. */
31117 f = sqrt(1.0 + xi*xi + eta*eta);
31118
31119 /* Apply the transformation and normalize. */
31120 v[0] = (x - (xi*y + eta*x*z) / r) / f;
31121 v[1] = (y + (xi*x - eta*y*z) / r) / f;
31122 v[2] = (z + eta*r) / f;
31123 return v;
31124
31125 /* Finished. */
31126
31127 }
31128
31129 /**
31130 *
31131 * In the tangent plane projection, given celestial spherical
31132 * coordinates for a star and the tangent point, solve for the star's
31133 * rectangular coordinates in the tangent plane.
31134 *
31135 * <p>This function is derived from the International Astronomical Union's
31136 * SOFA (Standards of Fundamental Astronomy) software collection.
31137 *
31138 * <p>Status: support function.
31139 *
31140 * <!-- Given: -->
31141 * @param a double star's spherical coordinates
31142 * @param b double star's spherical coordinates
31143 * @param a0 double tangent point's spherical coordinates
31144 * @param b0 double tangent point's spherical coordinates
31145 *
31146 * <!-- Returned: -->
31147 * @return rectangular coordinates of star image (Note 2)
31148 * int status: 0 = OK
31149 * 1 = star too far from axis
31150 * 2 = antistar on tangent plane
31151 * 3 = antistar too far from axis
31152 *
31153 * <p>Notes: <ol>
31154 *
31155 * <li> The tangent plane projection is also called the "gnomonic
31156 * projection" and the "central projection".
31157 *
31158 * <li> The eta axis points due north in the adopted coordinate system.
31159 * If the spherical coordinates are observed (RA,Dec), the tangent
31160 * plane coordinates (xi,eta) are conventionally called the
31161 * "standard coordinates". For right-handed spherical coordinates,
31162 * (xi,eta) are also right-handed. The units of (xi,eta) are,
31163 * effectively, radians at the tangent point.
31164 *
31165 * <li> All angular arguments are in radians.
31166 *
31167 * <li> This function is a member of the following set:
31168 *{@code
31169 * spherical vector solve for
31170 *
31171 * > iauTpxes < iauTpxev xi,eta
31172 * iauTpsts iauTpstv star
31173 * iauTpors iauTporv origin
31174 *}
31175 *</ol>
31176 * References:
31177 *
31178 * Calabretta M.R. & Greisen, E.W., 2002, "Representations of
31179 * celestial coordinates in FITS", Astron.Astrophys. 395, 1077
31180 *
31181 * Green, R.M., "Spherical Astronomy", Cambridge University Press,
31182 * 1987, Chapter 13.
31183 *
31184 * @version 2018 January 2
31185 *
31186 * @since JSOFA release 20180130
31187 *
31188 */
31189 public static TangentPlaneCoordinate jauTpxes(double a, double b, double a0, double b0)
31190 {
31191 int j;
31192 double sb0, sb, cb0, cb, da, sda, cda, d;
31193
31194
31195 /* Functions of the spherical coordinates. */
31196 sb0 = sin(b0);
31197 sb = sin(b);
31198 cb0 = cos(b0);
31199 cb = cos(b);
31200 da = a - a0;
31201 sda = sin(da);
31202 cda = cos(da);
31203
31204 /* Reciprocal of star vector length to tangent plane. */
31205 d = sb*sb0 + cb*cb0*cda;
31206
31207 /* Check for error cases. */
31208 if ( d > TANGENT_TINY ) {
31209 j = 0;
31210 } else if ( d >= 0.0 ) {
31211 j = 1;
31212 d = TANGENT_TINY;
31213 } else if ( d > -TANGENT_TINY ) {
31214 j = 2;
31215 d = -TANGENT_TINY;
31216 } else {
31217 j = 3;
31218 }
31219
31220 /* Return the tangent plane coordinates (even in dubious cases). */
31221 return new TangentPlaneCoordinate( cb*sda / d,
31222 (sb*cb0 - cb*sb0*cda) / d, j);
31223
31224
31225 /* Finished. */
31226 }
31227
31228 /**
31229 *
31230 * In the tangent plane projection, given celestial direction cosines
31231 * for a star and the tangent point, solve for the star's rectangular
31232 * coordinates in the tangent plane.
31233 *
31234 * <p>This function is derived from the International Astronomical Union's
31235 * SOFA (Standards of Fundamental Astronomy) software collection.
31236 *
31237 * <p>Status: support function.
31238 *
31239 * <!-- Given: -->
31240 * @param v double[3] direction cosines of star (Note 4)
31241 * @param v0 double[3] direction cosines of tangent point (Note 4)
31242 *
31243 * <!-- Returned: -->
31244 * @return tangent plane coordinates of star
31245 * int status: 0 = OK
31246 * 1 = star too far from axis
31247 * 2 = antistar on tangent plane
31248 * 3 = antistar too far from axis
31249 *
31250 * <p>Notes: <ol>
31251 *
31252 * <li> The tangent plane projection is also called the "gnomonic
31253 * projection" and the "central projection".
31254 *
31255 * <li> The eta axis points due north in the adopted coordinate system.
31256 * If the direction cosines represent observed (RA,Dec), the tangent
31257 * plane coordinates (xi,eta) are conventionally called the
31258 * "standard coordinates". If the direction cosines are with
31259 * respect to a right-handed triad, (xi,eta) are also right-handed.
31260 * The units of (xi,eta) are, effectively, radians at the tangent
31261 * point.
31262 *
31263 * <li> The method used is to extend the star vector to the tangent
31264 * plane and then rotate the triad so that (x,y) becomes (xi,eta).
31265 * Writing (a,b) for the celestial spherical coordinates of the
31266 * star, the sequence of rotations is (a+pi/2) around the z-axis
31267 * followed by (pi/2-b) around the x-axis.
31268 *
31269 * <li> If vector v0 is not of unit length, or if vector v is of zero
31270 * length, the results will be wrong.
31271 *
31272 * <li> If v0 points at a pole, the returned (xi,eta) will be based on
31273 * the arbitrary assumption that the longitude coordinate of the
31274 * tangent point is zero.
31275 *
31276 * <li> This function is a member of the following set:
31277 *{@code
31278 * spherical vector solve for
31279 *
31280 * iauTpxes > iauTpxev < xi,eta
31281 * iauTpsts iauTpstv star
31282 * iauTpors iauTporv origin
31283 * }
31284 *</ol>
31285 * References:
31286 *
31287 * Calabretta M.R. & Greisen, E.W., 2002, "Representations of
31288 * celestial coordinates in FITS", Astron.Astrophys. 395, 1077
31289 *
31290 * Green, R.M., "Spherical Astronomy", Cambridge University Press,
31291 * 1987, Chapter 13.
31292 *
31293 * @version 2018 January 2
31294 *
31295 * @since JSOFA release 20180130
31296 *
31297 */
31298 public static TangentPlaneCoordinate jauTpxev(double v[], double v0[])
31299 {
31300 int j;
31301 double x, y, z, x0, y0, z0, r2, r, w, d;
31302
31303
31304 /* Star and tangent point. */
31305 x = v[0];
31306 y = v[1];
31307 z = v[2];
31308 x0 = v0[0];
31309 y0 = v0[1];
31310 z0 = v0[2];
31311
31312 /* Deal with polar case. */
31313 r2 = x0*x0 + y0*y0;
31314 r = sqrt(r2);
31315 if ( r == 0.0 ) {
31316 r = 1e-20;
31317 x0 = r;
31318 }
31319
31320 /* Reciprocal of star vector length to tangent plane. */
31321 w = x*x0 + y*y0;
31322 d = w + z*z0;
31323
31324 /* Check for error cases. */
31325 if ( d > TANGENT_TINY ) {
31326 j = 0;
31327 } else if ( d >= 0.0 ) {
31328 j = 1;
31329 d = TANGENT_TINY;
31330 } else if ( d > -TANGENT_TINY ) {
31331 j = 2;
31332 d = -TANGENT_TINY;
31333 } else {
31334 j = 3;
31335 }
31336
31337 /* Return the tangent plane coordinates (even in dubious cases). */
31338 d *= r;
31339 return new TangentPlaneCoordinate( (y*x0 - x*y0) / d,
31340 (z*r2 - z0*w) / d, j);
31341
31342
31343 /* Finished. */
31344 }
31345 }
31346
31347 /*
31348 * Copyright © 2018 Paul Harrison, University of Manchester.
31349 *
31350 * This JSOFA software is derived from the official C release of the "Standards Of Fundamental Astronomy" (SOFA) library
31351 * of the International Astronomical Union. The intention is to reproduce the functionality and algorithms of
31352 * the official SOFA library in a pure Java form.
31353 *
31354 * The responsibility for the maintenance and supply of the JSOFA library lies with the author (not the IAU SOFA Board),
31355 * However, The JSOFA software is provided "as is" and the author makes no warranty as to its use or performance.
31356 * The author does not and cannot warrant the performance or results which the user may obtain by using the JSOFA software.
31357 * The author makes no warranties, express or implied, as to non-infringement of third party rights, merchantability,
31358 * or fitness for any particular purpose. In no event will the author be liable to the user for any consequential,
31359 * incidental, or special damages, including any lost profits or lost savings, even if the author has been advised
31360 * of such damages, or for any claim by any third party.
31361 *
31362 * Other conditions of the original license (reproduced below) are carried over as applicable.
31363 */
31364
31365 /*----------------------------------------------------------------------
31366 *
31367 * Copyright (C) 2018
31368 * Standards Of Fundamental Astronomy Board
31369 * of the International Astronomical Union.
31370 *
31371 * =====================
31372 * SOFA Software License
31373 * =====================
31374 *
31375 * NOTICE TO USER:
31376 *
31377 * BY USING THIS SOFTWARE YOU ACCEPT THE FOLLOWING SIX TERMS AND
31378 * CONDITIONS WHICH APPLY TO ITS USE.
31379 *
31380 * 1. The Software is owned by the IAU SOFA Board ("SOFA").
31381 *
31382 * 2. Permission is granted to anyone to use the SOFA software for any
31383 * purpose, including commercial applications, free of charge and
31384 * without payment of royalties, subject to the conditions and
31385 * restrictions listed below.
31386 *
31387 * 3. You (the user) may copy and distribute SOFA source code to others,
31388 * and use and adapt its code and algorithms in your own software,
31389 * on a world-wide, royalty-free basis. That portion of your
31390 * distribution that does not consist of intact and unchanged copies
31391 * of SOFA source code files is a "derived work" that must comply
31392 * with the following requirements:
31393 *
31394 * a) Your work shall be marked or carry a statement that it
31395 * (i) uses routines and computations derived by you from
31396 * software provided by SOFA under license to you; and
31397 * (ii) does not itself constitute software provided by and/or
31398 * endorsed by SOFA.
31399 *
31400 * b) The source code of your derived work must contain descriptions
31401 * of how the derived work is based upon, contains and/or differs
31402 * from the original SOFA software.
31403 *
31404 * c) The names of all routines in your derived work shall not
31405 * include the prefix "iau" or "sofa" or trivial modifications
31406 * thereof such as changes of case.
31407 *
31408 * d) The origin of the SOFA components of your derived work must
31409 * not be misrepresented; you must not claim that you wrote the
31410 * original software, nor file a patent application for SOFA
31411 * software or algorithms embedded in the SOFA software.
31412 *
31413 * e) These requirements must be reproduced intact in any source
31414 * distribution and shall apply to anyone to whom you have
31415 * granted a further right to modify the source code of your
31416 * derived work.
31417 *
31418 * Note that, as originally distributed, the SOFA software is
31419 * intended to be a definitive implementation of the IAU standards,
31420 * and consequently third-party modifications are discouraged. All
31421 * variations, no matter how minor, must be explicitly marked as
31422 * such, as explained above.
31423 *
31424 * 4. You shall not cause the SOFA software to be brought into
31425 * disrepute, either by misuse, or use for inappropriate tasks, or
31426 * by inappropriate modification.
31427 *
31428 * 5. The SOFA software is provided "as is" and SOFA makes no warranty
31429 * as to its use or performance. SOFA does not and cannot warrant
31430 * the performance or results which the user may obtain by using the
31431 * SOFA software. SOFA makes no warranties, express or implied, as
31432 * to non-infringement of third party rights, merchantability, or
31433 * fitness for any particular purpose. In no event will SOFA be
31434 * liable to the user for any consequential, incidental, or special
31435 * damages, including any lost profits or lost savings, even if a
31436 * SOFA representative has been advised of such damages, or for any
31437 * claim by any third party.
31438 *
31439 * 6. The provision of any version of the SOFA software under the terms
31440 * and conditions specified herein does not imply that future
31441 * versions will also be made available under the same terms and
31442 * conditions.
31443 *
31444 * In any published work or commercial product which uses the SOFA
31445 * software directly, acknowledgement (see www.iausofa.org) is
31446 * appreciated.
31447 *
31448 * Correspondence concerning SOFA software should be addressed as
31449 * follows:
31450 *
31451 * By email: sofa@ukho.gov.uk
31452 * By post: IAU SOFA Center
31453 * HM Nautical Almanac Office
31454 * UK Hydrographic Office
31455 * Admiralty Way, Taunton
31456 * Somerset, TA1 2DN
31457 * United Kingdom
31458 *
31459 *--------------------------------------------------------------------*/
31460
31461
31462 /*
31463 * $Log$
31464 */